Comments
Figure 133. Java™ comment flavors
- Multi line comment:
int a; /* We define a variable. Then subsequently a value is being assigned */ a = 33;
- End of line comment:
int a; // We define a variable. a = 33; // Then subsequently a value is being assigned
int strength = a /* fixed value */ + b /* age */ + c /* courage */;
being run-time equivalent to:
int strength = a + b + c;
Figure 135. Javadoc™ comments