Which usage represents a valid way of compiling java source file with the name "Main"?
Correct Answer: A
The compiler is invoked by the javac command. When compiling a Java class, you must include the file name, which houses the main classes including the Java extension. So to run Main.java file we have to use command in option A. TO execute Java program we can use Java command but can't use it for compiling. https://docs.oracle.com/javase/tutorial/getStarted/application/index.html
Question 142
Given the code fragment: What is the result?
Correct Answer: F
Explanation/Reference: Explanation:
Question 143
Given: And given the code fragment: What is the result?
Correct Answer: B
Question 144
Given the code fragment: What is the result?
Correct Answer: D
Question 145
Given the code fragment: Test.java: Which is the result?