KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > InputRequireThis


1 import java.awt.Toolkit JavaDoc;
2
3 public class InputRequireThis {
4     int i;
5     void method1() {
6         i = 3;
7     }
8
9     void method2(int i) {
10         i++;
11         this.i = i;
12         method1();
13         try {
14             this.method1();
15         }
16         catch (RuntimeException JavaDoc e) {
17             e.printStackTrace();
18         }
19         this.i--;
20
21         Integer.toString(10);
22     }
23
24     <T> void method3()
25     {
26         i = 3;
27     }
28
29     void method4() {
30         this.<String JavaDoc>method3();
31         this.<I>method3();
32     }
33     int I = 0;
34     private class I {}
35 }
36
37 enum MyEnum
38 {
39     A,
40     B
41     {
42         void doSomething()
43         {
44             z = 1;
45         }
46     };
47
48     int z;
49     private MyEnum()
50     {
51         z = 0;
52     }
53 }
54
Popular Tags