Java   View all facts   Glossary   Help
syntactic unit > comment
Next syntactic unitdeclaration    Upsyntactic unit    Previous syntactic unitclause   

comment
subjectfact 
commentcan be written before writing the codesource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
can precede package statementsadded by: Marvin, 2001-10-19 11:36:29.0
has example
 executeMe(); // doNotExecuteMe
source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
has example
executeMeToo(); /* This is to be ignored
and this too */
source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
has purpose to describe the purpose of each class, method and variable along with any difficult-to-understand statements inside methods, and to indicated any changes to the codesource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
has syntax '/*' comment '*/' or two slashes '//' indicating that the rest of the line is to be considered a comment    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
has syntax
/** commentText */
OR
/* commentText */
OR
// commentText
Note: '//' ignores everything to end of line
added by: JK, source: Sun Java Tutorial, 2001-10-19 11:36:29.0
is essential to give readers an overview and to help them understand its complexities quicklysource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
is a subtopic of Java Basics2001-10-19 11:36:29.0
is a kind of syntactic unitadded by: DS, 2001-10-19 11:36:29.0
should be between about 20% and 35% of the total length of the codesource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
should be written to describe each non-obvious variablesource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
should be written to describe loops and conditional statements inside complex algorithmssource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
should be written at the head of each non-obvious method describing its function and usagesource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
should be written at the top of each classsource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
should describe the purpose of the class, how it should be used, its authors and its history of modificationsource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
should not be about obvious things since they add cluttersource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:29.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0

Next syntactic unitdeclaration    Upsyntactic unit    Previous syntactic unitclause