Question & Answer
1. Is Java Platform Independent if then how ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
   Java is platform-independent because it is compiled to a bytecode that can be run on any device that has a Java Virtual Machine (JVM).
2. How many types of packages are there in Java ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
3. What is JVM ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
   JVM is a virtual machine that enables the execution of Java bytecode. The JVM acts as an interpreter between the Java programming language and the underlying hardware.
4. What is JIT ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
   The Just-In-Time (JIT) compiler is a component of the runtime environment that improves the performance of Java™ applications by compiling bytecodes to native machine code at run time.
5. Which component is used to compile, debug and execute the java programs ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
6. Which of the following is OOPS concept in Java ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
7. Which of the following is a type of polymorphism in Java Programming ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
8. What will be the output of the following Java program ?
Snippet
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
9. What is the extension of compiled java classes ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software
10. Which exception is thrown when java is out of memory ?
Hints :
javac compiler compiles the program to form a bytecode or .class file
Explanation :
The bytecode can be created on any System and can be executed in any other system despite hardware or software