?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Easy

Comment Descriptions

APCSA-FPETOJ

When implementing a new class, it is very beneficial to add comments.

Which of the following BEST identifies how the following symbols are used in Java?

I.    /** comment */
II.   // comment
III.  /* comment */
A
I.    multi-line comment – used to provide more than one line of
      comments
II.   single line comment – used to provide a short comment
III.  javadoc comment – used primarily to document classes and 
      methods
B
I.    javadoc comment – used primarily to comment out unused
      code
II.   single line comment – can be used to comment out code
III.  multi-line commentnot recommended to comment out unused
      code
C
I.    multi-line commentnot recommended to comment out unused
      code
II.   single line comment – can be used to comment out code
III.  javadoc comment – used primarily to comment out unused 
      code
D
I.    multi-line comment – used primarily to comment out unused
      code
II.   javadoc comment – can be used to comment out code
III.  single-line commentnot recommended to comment out 
      unused code
E
I.    javadoc comment – used primarily to document classes and 
      methods
II.   single line comment – used to provide a short comment
III.  multi-line comment – used to provide more than one line 
      of comments