-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay2Keywords.txt
107 lines (70 loc) · 1.6 KB
/
Day2Keywords.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Pravins-MBP 98-01-A7-95-2B-BD
enum A {
%E
;
int x;
class B { // inner class
int d = calculateDistance(p1,p2);
assert d >= 0 : "distance check failed";
}
static class C {
int m1() throws E1 {
.
if (errorDetected) {
throw new E1();
}
return 0;
}
}
@inerface MyAnnotation {
}
}
A.C ac1 = new A.C();
A a = new A();
A.B ab1 = a.new B();
A.B ab2 = a.new B();
keyword 50 + 1
-------------
_ future use from java 9
const
goto
byte, short, int, long, foat, double, char, boolean, void (9)
class, interface, enum, extends, implements (5)
public protected private (3)
abstract, final, static, native, strictfp, synchronized, transient, volaile, default (9)
package, import, throws, try, catch, finally (6)
if, else, switch, for, case, while, do,assert, throw, return, break, continue, assert (12)
new, instanceof, this, super (4)
Literals
true, false, null
Vehicle v = new Car(); // new Bike();
if (v instanceof Car) {
}
void m1(Vehicle v) {
}
public class SomeClass {
int x;
int y;
int m1(int x) {
x
this.x
(this instanceof SubClass)
}
static int m2(int y) {
}
public static void main(String[] args) {
SomeClass.m2(4);
// SomeClass.m1(5);
SomeClass sc1 = new SubClass();
sc1.m1();
}
}
public class SubClass extends SomeClass {
int m1(int x) {
...
}
void someMethod() {
this.m1(5);
super.m1(5)
}
}