Consider the following Java program:

1
2
3
4
5
6
public class HelloWorld {
     // My first program!
     public static void main(String[] args) {
         System.out.println("Hello, World!");
     }
 }

What starts on line 1? Select one:

  • a. a comment
  • b. a class definition
  • c. a variable declaration
  • d. a statement
  • e. a method (subroutine) definition

The correct answer is: a class definition

Related Posts

0 Comments

12345

    00