Beispiel #1
0
 public void printFlat() {
   if (myName != null) {
     System.out.println(myName);
     for (Amoeba a : myChildren) {
       a.printFlat();
     }
     ;
   }
 }
Beispiel #2
0
 // Print the names of all amoebas in the family.
 // later you will write print() that has more interesting formatting
 public void printFlat() {
   if (myRoot != null) {
     myRoot.printFlat();
   }
 }