/Users/lyon/j4p/src/bookExamples/ch06RefDataTypes/Mammal.java

1    package bookExamples.ch06RefDataTypes; 
2     
3    /** 
4     An example of storing the AKO hierarchy 
5     using classes. 
6     */ 
7    class Mammal { 
8        private boolean hasHair = true; 
9    } 
10    
11   class Human extends Mammal2 { 
12    
13       public static void main(String args[]) { 
14           System.out.println("Hello World!"); 
15    
16       } 
17   } 
18    
19   class Doggy extends Mammal2 { 
20       public static void main(String args[]) { 
21           System.out.println("Hello World!"); 
22    
23       } 
24   } 
25    
26   class Student extends Human { 
27       public static void main(String args[]) { 
28           System.out.println("Hello World!"); 
29    
30       } 
31   } 
32    
33   class Professor extends Human { 
34       public static void main(String args[]) { 
35           System.out.println("Hello World!"); 
36    
37       } 
38   }