KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > InputExplicitInit


1 public class InputExplicitInit {
2     private int x = 0;
3     private Object JavaDoc bar = null;
4     private int y = 1;
5     private long y1 = 1 - 1;
6     private long y3;
7     private long y4 = 0L;
8     private boolean b1 = false;
9     private boolean b2 = true;
10     private boolean b3;
11     private String JavaDoc str = "";
12     java.lang.String JavaDoc str1 = null, str3 = null;
13     int ar1[] = null;
14     int ar2[] = new int[1];
15     int ar3[];
16     float f1 = 0f;
17     double d1 = 0.0;
18
19     static char ch;
20     static char ch1 = 0;
21     static char ch2 = '\0';
22     static char ch3 = '\1';
23
24     void method() {
25         int xx = 0;
26         String JavaDoc s = null;
27     }
28 }
29
30 interface interface1{
31     int TOKEN_first = 0x00;
32     int TOKEN_second = 0x01;
33     int TOKEN_third = 0x02;
34 }
35
36 class InputExplicitInit2 {
37     private Bar<String JavaDoc> bar = null;
38     private Bar<String JavaDoc>[] barArray = null;
39 }
40
41 enum InputExplicitInit3 {
42     A,
43     B
44     {
45         private int x = 0;
46         private Bar<String JavaDoc> bar = null;
47         private Bar<String JavaDoc>[] barArray = null;
48         private int y = 1;
49     };
50     private int x = 0;
51     private Bar<String JavaDoc> bar = null;
52     private Bar<String JavaDoc>[] barArray = null;
53     private int y = 1;
54 }
55
56 @interface annotation1{
57     int TOKEN_first = 0x00;
58     int TOKEN_second = 0x01;
59     int TOKEN_third = 0x02;
60 }
61
62 class ForEach {
63     public ForEach(java.util.Collection JavaDoc<String JavaDoc> strings)
64     {
65         for(String JavaDoc s : strings) //this should not even be checked
66
{
67
68         }
69     }
70 }
71
72 class Bar<T> {
73 }
74
Popular Tags