The instruction: System.out.println("Hello World"); might best be commented as:

The instruction:  System.out.println("Hello World"); might best be commented as:

a) // prints "Hello World" to the screen
b) // prints a message
c) // used to demonstrate an output message
d) //
e) // meaningless instruction


Answer:  c.

Explanation:  Comments in a and b state the obvious while the comments in d and e are meaningless.  The comment in c explains why the instruction appears in the program.


Java

Learn More Multiple Choice Question :