How are line comments and block comments used?

What will be an ideal response?

A line comment is included as documentation to the programmer or a programmer that might need to modify the code at some later date. A line comment is signified by //. Anything that follows the // is considered a comment by the compiler until the end of the line is reached.
A block comment is included as documentation to users of the class. Users of the class are usually other programmers. A block comment begins with /* and ends with */. A block comment my span many lines. Any text between the beginning /* and the ending */ is part of the block comment. A special block comment can be used with Javadoc, a documentation tool included in Java’s SDK, to create documentation for users of the class.

Computer Science & Information Technology

You might also like to view...

An operational state of Windows Media Player in which its user interface is displayed as a special theme is referred to as ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Answer the following questions true (T) or false (F)

1. A simple path may pass through the same vertex more than once. 2. All paths begin and end at the same vertex. 3. A simple cycle only passes through one vertex.

Computer Science & Information Technology