equal
deleted
inserted
replaced
5 ================ |
5 ================ |
6 |
6 |
7 Class version. |
7 Class version. |
8 ============== |
8 ============== |
9 |
9 |
10 See value of 6 and 8 bytes in .class file: |
10 ========= ====== ===================== |
|
11 major minor Java platform version |
|
12 ========= ====== ===================== |
|
13 45 0x27 3 1.0 |
|
14 45 0x27 3 1.1 |
|
15 46 0x28 0 1.2 |
|
16 47 0x29 0 1.3 |
|
17 48 0x30 0 1.4 |
|
18 49 0x31 0 1.5 |
|
19 50 0x32 0 1.6 |
|
20 ========= ====== ===================== |
11 |
21 |
12 {0xCA, 0xFE, 0xBA, 0xBE, 0x00, minor, 0x00, major} |
22 where ``minor`` and ``major`` are value of 6 and 8 bytes in .class file:: |
13 |
23 |
14 major minor Java platform version |
24 0xCA, 0xFE, 0xBA, 0xBE, 0x00, minor, 0x00, major |
15 45 0x27 3 1.0 |
|
16 45 0x27 3 1.1 |
|
17 46 0x28 0 1.2 |
|
18 47 0x29 0 1.3 |
|
19 48 0x30 0 1.4 |
|
20 49 0x31 0 1.5 |
|
21 50 0x32 0 1.6 |
|
22 |
25 |
23 Access modifiers. |
26 Access modifiers. |
24 ================= |
27 ================= |
25 |
28 |
26 Public. |
29 Public. |
31 |
34 |
32 Private. |
35 Private. |
33 -------- |
36 -------- |
34 |
37 |
35 * Private variables or methods may be used only by an instance of the same |
38 * Private variables or methods may be used only by an instance of the same |
36 class that declares the variable or method |
39 class that declares the variable or method |
37 * A private feature may only be accessed by the class that owns the feature. |
40 * A private feature may only be accessed by the class that owns the feature. |
38 |
41 |
39 Protected. |
42 Protected. |
40 ---------- |
43 ---------- |
41 |
44 |
42 * Is available to all classes in the same package and also available to all |
45 * Is available to all classes in the same package and also available to all |
43 subclasses of the class that owns the protected feature. |
46 subclasses of the class that owns the protected feature. |
44 * This access is provided even to subclasses that reside in a different |
47 * This access is provided even to subclasses that reside in a different |
45 package from the class that owns the protected feature. |
48 package from the class that owns the protected feature. |
46 |
49 |
47 default. |
50 default. |
48 -------- |
51 -------- |
49 |
52 |
50 What you get by default ie, without any access modifier. |
53 What you get by default ie, without any access modifier. |