Skip to content

Commit f225a01

Browse files
committed
test
1 parent ff87b43 commit f225a01

3 files changed

Lines changed: 88 additions & 0 deletions

File tree

.idea/dictionaries/max.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/advanced/EnumLesson.java

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
package advanced;
2+
3+
public class EnumLesson {
4+
public static void main(String[] args) {
5+
}
6+
}
7+
8+
//final class Level extends Enum
9+
//{
10+
// public static final Level BEGINNER;
11+
// public static final Level INTERMEDIATE;
12+
// public static final Level EXPERT;
13+
//
14+
// private static final Level $VALUES[];
15+
// static
16+
// {
17+
// BEGINNER = new Level("BEGINNER", 0);
18+
// INTERMEDIATE = new Level("INTERMEDIATE", 1);
19+
// EXPERT = new Level("EXPERT", 2);
20+
// $VALUES = (new Level[] {
21+
// BEGINNER, INTERMEDIATE, EXPERT
22+
// });
23+
// }
24+
// public static Level[] values()
25+
// {
26+
// return (Level[])$VALUES.clone();
27+
// }
28+
// public static Level valueOf(String s)
29+
// {
30+
// return (Level)Enum.valueOf(Level, s);
31+
// }
32+
// private Level(String s, int i)
33+
// {
34+
// super(s, i);
35+
// }
36+
//}
37+
38+
//abstract class Enum<E extends Enum<E>>
39+
// implements Comparable<E>, Serializable {
40+
// private final String name;
41+
// private final int ordinal;
42+
// protected Enum(String name, int ordinal) {
43+
// this.name = name;
44+
// this.ordinal = ordinal;
45+
// }
46+
// public String toString() {
47+
// return name;
48+
// }
49+
// public final String name() {
50+
// return name;
51+
// }
52+
//}
53+
54+
//class MyEnum<E extends Enum> extends Enum<MyEnum<Enum>> {
55+
// MyEnum(String s, int i) {
56+
// super(s,i);
57+
// }
58+
//}

src/advanced/FinalLesson.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package advanced;
2+
3+
public class FinalLesson {
4+
public static void main(String[] args) {
5+
One one = new Two();
6+
one.executeMathod();
7+
}
8+
}
9+
10+
class One {
11+
private final void method() {
12+
System.out.println("one");
13+
}
14+
void executeMathod() {
15+
One one = new Two();
16+
one.method();
17+
}
18+
}
19+
class Two extends One {
20+
void method() {
21+
System.out.println("two");
22+
}
23+
}

0 commit comments

Comments
 (0)