forked from natural/java2python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClass04.java
More file actions
24 lines (18 loc) · 473 Bytes
/
Class04.java
File metadata and controls
24 lines (18 loc) · 473 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// tests inner class instance declaration and creation
class Class04 {
static class StaticInner {
public static String x = "notnull";
}
int foo = 3;
class NestedInner {
public String y = "somenull";
}
int bar = 4;
public static void main(String[] args) {
Class04 c4 = new Class04();
StaticInner si = new StaticInner();
System.out.println(si.x);
NestedInner ni = c4.new NestedInner();
System.out.println(ni.y);
}
}