Java OCA OCP Practice Question 1284

Question

Which of the following are valid Java comments?

  • A. \\ This is a comment.
  • B. /* This is a comment. */
  • C. / This is a comment. */
  • D. \* This is a comment *\


B and C.

Note

Comments use slashes and not backslashes.




PreviousNext

Related