KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Test29


1 public class Test29 {
2
3     public static void main(String JavaDoc [] args){
4         Test29 t = new Test29();
5         t.run();
6     }
7     
8     public void run(){
9         TL1 tl1 = new TL1();
10         tl1.run();
11         TL2 tl2 = new TL2();
12         tl2.run();
13     }
14 }
15
16 class TL1{
17     public void run(){
18         System.out.println("Top-level 1");
19     }
20 }
21
22 class TL2{
23     public void run(){
24         System.out.println("Top-level 2");
25     }
26 }
27
Popular Tags