Basic Syntax
- Which of the below is invalid identifier with main method?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
main method cannot be private as it is invoked by external method. Other identifier are valid with main method.
- Which statement is true about java?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Java is called ‘Platform Independent Language’ as it primarily works on the principle of ‘compile once, run everywhere’.
- Which component is responsible to optimize bytecode to machine code?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
JIT optimizes bytecode to machine specific language code by compiling similar bytecodes at same time.This reduces overall time taken for compilation of bytecode to machine specific language.
- Which component is responsible to run java program?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
JRE is the implementation of JVM, it provides platform to execute java programs.
- Which component is responsible for converting bytecode into machine specific code?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
JVM is responsible to converting bytecode to the machine specific code. JVM is also platform dependent and provides core java functions like garbage collection,memory management, security etc.