Java Reference
In-Depth Information
All characters between /* and the next */ are ig-
nored.
/* comment */
All characters between /** and the next */ are ig-
nored.
These documentation comments come immediately
before identifier declarations and are included in
automatically generated documentation. These com-
ments are described in Chapter 19 .
/** comment */
Comments can include any valid Unicode character, such as yin-yang
( \u262f ), asterism ( \u2042 ), interrobang ( \u203d ), won ( \u20a9 ), scruple
( \u2108 ), or a snowman ( \u2603 ). [3]
[3] These characters are
,
,
,
,
, and
, respectively.
Comments do not nest. This following tempting code does not compile:
/* Comment this out for now: not implemented
/* Do some really neat stuff */
universe.neatStuff();
*/
The first /* starts a comment; the very next */ ends it, leaving the code
that follows to be parsed; and the invalid, stand-alone */ is a syntax er-
ror. The best way to remove blocks of code from programs is either to
put a // at the beginning of each line or use if(false) like this:
if (false) {
// invoke this method when it works
 
Search WWH ::




Custom Search