22. The main method header is written as:
a. public static void main(string[] args)
b. public static void Main(String[] args)
c. public static void main(String[] args)
d. public static main(String[] args)
e. public void main(String[] args)
#
23. Which of the following statements is correct?
a. Every line in a program must end with a semicolon.
b. Every statement in a program must end with a semicolon.
c. Every comment line must end with a semicolon.
d. Every method must end with a semicolon.
e. Every class must end with a semicolon.
#
24. Which of the following statements is correct to display Welcome to Java on the console?
a. System.out.println(‘Welcome to Java’);
b. System.out.println(“Welcome to Java”);
c. System.println(‘Welcome to Java’);
d. System.out.println(‘Welcome to Java”);
e. System.out.println(“Welcome to Java’);
Section 1.8 Creating, Compiling, and Executing a Java Program
25. The JDK command to just compile a class (not run) in the file Test.java is
a. java Test
b. java Test.java
c. javac Test.java
d. javac Test
e. JAVAC Test.java
#
26. Which JDK command is correct to run a Java application in ByteCode.class?
a. java ByteCode
b. java ByteCode.class
c. javac ByteCode.java
d. javac ByteCode
e. JAVAC ByteCode
#
27. Java compiler translates Java source code into .
a. Java bytecode