Comments

Figure 133. Java comment flavors Slide presentation
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 134. Inline comments Slide presentation
int strength = a /* fixed value */ + b /* age */ + c /* courage */;

being run-time equivalent to:

int strength = a + b + c;

Figure 135. Javadoc comments Slide presentation
/**
 * Describing rectangles. 
 */
public class Rectangle {

  /**
   *
   * @param width Setting the rectangle's new width. 
   */         
              ┗━━━━━━━━━━━━━━━━━┓
                                
  public void setWidth(double width) {
      // Implementation yet missing
  }
  ...
}

A Javadoc describing class Rectangle.

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