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 is on line 3? Select one:

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

The correct answers are: a method (subroutine) definition , a class definition

Related Posts

0 Comments

12345

    00