Back to slide -- Keyboard shortcut: 'u'              Bank5.java - Et eksempel på en klasse som anvender IoKonto.Lecture 8 - slide 20 : 26
Program 1

class Bank5 {
 
   public static void main( String[] args ) {

     IoKonto k1 = new IoKonto("Børge"),
             k2 = new IoKonto("Karl");

     k1.indsæt(100.0);
     System.out.print("k1: ");
     System.out.println(k1.toStringRepresentation());

     k2.hæv(400.0);
     System.out.print("k2: ");
     System.out.println(k2.toStringRepresentation());

     System.out.print("k1 taken from k2's string representation: ");
     k1.fromStringRepresentation(k2.toStringRepresentation());
     System.out.println(k1.toStringRepresentation());

   }
} // end Bank5