Java OCA OCP Practice Question 1246

Question

What output is displayed as the result of executing the following statement?

System.out.println("// Looks like a comment.");  
  • A. // Looks like a comment.
  • B. / Looks like a comment.
  • C. No output is displayed.
  • D. The statement results in a compilation error.


A.

Note

Comments may not appear in a String literal.




PreviousNext

Related