Test Series - java

Test Number 4/64

Q: What is Ahead of Time Compiler in Java?
A. Ahead of time compiler compiles java files as and when you type and save.
B. Ahead of time compiler turns byte code to executable code line by line based on requirement
C. Ahead of time compiler is a replacement for JIT compiler to translate all byte code to a single executable file or code to run the program fast and efficient.
D. None of the above
Solution: no solution
Q: What is the Java command used to compile a java program from Command Line or Command Prompt or CMD?
A. >java hello.java
B. >javac hello.java
C. >javacomp hello.java
D. >javacmd hello.java
Solution: no solution
Q: What is the command used to Run a Java program form Command Line or Command Prompt or CMD?
A. javac hello
B. java hello.class
C. java hello
D. java hello.java
Solution: "java" command expects only a Class Name without the file name extension like .class.
Q: What is a Java Editor?
A. Java editor is simply an IDE like Notepad to type or edit java programs. It does not have ability Compiling or Running java programs without installing separate Java Packages on the PC.
B. Java editor is like Eclipse IDE that has shortcut options or buttons to compile and run java programs without using CMD or Command Line.
C. Java IDE searches for the installed Java location for JAVAC, JAVA and JAWAH to compile and run programs for you.
D. All the above
Solution: no solution
Q: Every statement in Java language should end with a?
A. Dot or Period
B. Comma
C. Semicolon
D. Colon
Solution: no solution
Q:  A function in C language is similar to what in Java language?
A. Method
B. Member
C. Variable
D. None of the above
Solution: no solution
Q: All methods and variables in Java language are kept inside a?
A.  File
B. Class or Interface
C. static method
D. main
Solution: no solution
Q: What is the need to mention "static" before main method?
A. To call main method without creating an object of class
B. To make main method as class method common to all instances
C. Both A and B
D. None of the above
Solution: no solution
Q: In standalone Java applications, which method is mandatory?
A. main method
B. show method
C. display method
D. print method
Solution: main() is the starting point of execution.
Q: 
A. 
B. 
C. 
D. 
Solution: 

You Have Score    /10