Beispiel: Kontoverwaltung mit Konstruktor
In unserer Kontoverwaltung kann die Methode open syste-matischer durch einen Konstruktor ersetzt werden:
{ protected static int next_acc = 0 ; // Klassenvariable
protected static final int MIN_BALANCE = 0 ; // Klassenkonstante
protected void add (int sum) // HilfsRV
{ balance = balance + sum ; }