C Programming Multiple Choice Questions (MCQ) | IT Developer <?php echo $page_title; ?>
IT Developer

Java Programming Multiple Choice Questions (MCQ)

Introduction to Java - Multiple Choice Questions (MCQ) - Set 6



Share with a Friend

Multiple Choice Questions


Java - Introduction to Java - Multiple Choice Questions (MCQ) - Set 6

26. Which command is used to run a Java program?
A). run
B). javac
C). java
D). execute
View Answer
Correct: C

 


Explanation
java Command : The java command runs the compiled bytecode using JVM.

 


27. What is the output of Java compilation?
A). Machine code
B). Bytecode
C). Assembly code
D). Source code
View Answer
Correct: B

 



Explanation
Bytecode Output: Java compilation produces bytecode, which is platform-independent.

 


28. Java bytecode is stored in:
A). .java file
B). .class file
C). .exe file
D). .jar file
View Answer
Correct: B

 


Explanation
.class File :
Bytecode is stored in .class files after compilation.




29. Which component executes Java bytecode?
A). JDK
B). JVM
C). JRE
D). Compiler
View Answer
Correct: B

 



Explanation
JVM Executes Bytecode : JVM interprets or compiles bytecode into machine code for execution.

 


30. JRE stands for:
A). Java Runtime Environment
B). Java Run Engine
C). Java Runtime Execution
D). Java Resource Engine
View Answer
Correct: A

 


Explanation
JRE (Java Runtime Environment) : JRE provides the runtime environment including JVM and libraries to run Java programs.