KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > Foo


1 package test;
2
3 public class Foo {
4     //static Object fooObject = null;
5
Object JavaDoc fooObject;
6     /**
7      */

8     public static void main(String JavaDoc [] args) throws Error JavaDoc {
9         System.out.println("Foo.main() " + (args.length > 1));
10         Foo f = new Foo();
11         f.foo();
12
13         if (args.length > 0) {
14             FooBar fb = new FooBar(args.length > 1);
15             fb.foobar();
16         }
17
18         try {
19             System.out.println("Calling Foo.toString()....");
20             String JavaDoc s = f.toString();
21             System.out.println(".... : " + s);
22         }
23         catch (Exception JavaDoc e) {
24         }
25     }
26
27     public Foo() {
28         System.out.println("Foo()");
29     }
30
31     public void foo() {
32         System.out.println("Foo.foo()");
33     }
34 }
35
Popular Tags