forked from natural/java2python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClass02.java
More file actions
19 lines (18 loc) · 466 Bytes
/
Class02.java
File metadata and controls
19 lines (18 loc) · 466 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// tests class variable initialization and reference
class Class02 {
public int w;
public int x = 1;
public int y, z = 2;
public int a = 3, b;
public static void main(String[] args) {
Class02 c = new Class02();
System.out.println(c.w);
System.out.println(c.x);
System.out.println(c.y);
System.out.println(c.z);
System.out.println(c.a);
System.out.println(c.b);
c.b++;
System.out.println(c.b);
}
}