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

1    package bookExamples.ch06RefDataTypes; 
2     
3    public class SuperDemo { 
4        public void print() { 
5            System.out.println("Oh, super man!"); 
6        } 
7    } 
8     
9    class SubclassDemo extends SuperDemo { 
10       public void print() { 
11           System.out.println("We are going down, uh huh!"); 
12           super.print(); 
13       } 
14    
15       public static void main(String args[]) { 
16           SubclassDemo scd = new SubclassDemo(); 
17           scd.print(); 
18       } 
19   }