Comments

Figure 154. Java comment flavors Slide presentation Create comment in forum
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

Figure 155. Inline comments Slide presentation Create comment in forum
int strength = a /* fixed value */ + b /* age */ + c /* courage */;

Run-time equivalent to:

int strength = a + b + c;

Figure 156. Javadoc comments Slide presentation Create comment in forum
/**
 * Describing rectangles. 
 */
public class Rectangle {
  /**
   *
   * @param width Setting the rectangle's new width. 
   */         
              ┗━━━━━━━━━━━━━━━━━┓
                                
  public void setWidth(double width) {
      // Implementation yet missing
  }
  // There is more to come soon ...
}

A Javadoc describing class Rectangle.

A Javadoc describing a method setWidth(...) within class Rectangle: @param width and double width are being tightly related.