Chapter 2 : Java Compiler and Java Interpreter

PCBWay

Q.1: Which of the following is the Java compiler?

DRex Electronics

A.  Java.exe
B. Javac.exe
C. Javap.exe
D. Javaci.exe

Answer : B

Q.2: Which of the following is the Java interpreter?

A. Javai.exe
B. Javat.exe
C. Javac.exe
D. Java.exe

Answer : D

Q.3: ………… Environment variable identifies the location of Java compiler?

A. CLASSPATH
B. PATH
C. JAVAPATH
D. COMPILERPATH

Answer : B

Q.4: How to get detailed compilation information when compiling a Java program ?

A. Javac – info
B. Javac – verbose
C. Javac – information
D. Javac – data

Answer : B

Q.5: How to get version of the Java interpreter ?

A. Java – V
B. Java – version
C. Java- ver
D. Java – info

Answer : B

Q.6: PATH environment variable can be set using ______ .

A. Command line
B. Control panel
C. Both A and B
D. Java compiler

Answer : C

Q.7: How to display value of PATH environment variable at command line?

A. PATH
B. Set PATH
C. Show PATH
D. Display PATH

Answer : B

Q.8: PATH environment variable can be set to a permanent state using …………

A. Command Line
B. Control Panel
C. Java compiler
D. Java Interpreter

Answer : B

Q.9: Java compiler options are case sensitive?

A. True
B. False

Answer : A

Q.10: How to get all compiler options for the Java compiler?

A. Javac -help
B.Javac -h
C. Javac -?
D. Javac/?

Answer : A

Q.11: Identify the correct command.

A. Set path = “C:\Program Files\Java\jdk1.8.0_65\bin”
B. Set PATH = “C:\Program Files\Java\jdk1.8.0_65\bin”
C. Set PATH = “%path%;”C:\Program Files\Java\jdk1.8.0_65\bin”
D. All of the above

Answer : D

Q.12: When a Java program is compiled it generates _______

A. Native code
B. Bytecode
C. IL
D. Source code

Answer : B

Q.13: ………….. is used for executing Java byte code.

A. Java.exe
B. Javac.exe
C. Javai.exe
D. Javam.exe

Answer : A

Q.14: Which command is used for setting PATH at command line?

A. GIVE
B. SET
C. ASSIGN
D.PATH

Answer : B

Q.15: How to get information on deprecated APIs while compiling ?

A. Javac -d
B. Javac -deprecated
C. Javac -deprecation
D. Javac -deprecate

Answer : C

Q.16: JVM is part of Java compiler.

A. True
B. False

Answer : B

Q.17: How to find the version of Java compiler?

A. Javac -version
B. Javac – Version
C. Javac – ver
D. Javac -v

Answer : A

Q.18: PATH environment variable identifies the location of ______

A. Java compiler
B. Java interpreter
C. Java tools
D. All of the above

Answer : D

Q.19: Java interpreter options are case sensitive.

A. True
B. False

Answer : A

Q.20: JVM is also called as ______

A. Java Interpreter
B. Java Compiler
C. JIT
D. All of the above

Answer : A

Q.21: ______ Envoronment variable identifies the location of Java interpreter .

A. CLASSPATH
B. PATH
C. DATAPATH
D. JAVAPATH

Answer : B