[10 pts] Suppose we have the class defined as below.
class C {
static int x = 0;
int y;
C() {
y = 0;
}
void incrX() {
x++;
IO.println(x);
}
void incrY() {
y++;
IO.println(y);
}
void incrZ() {
int z = 0;
z++;
IO.println(z);
}
}
|
public class Example {
public static void run() {
C a = new C();
C b = new C();
a.incrX();
a.incrX();
b.incrX();
a.incrY();
a.incrY();
b.incrY();
a.incrZ();
a.incrZ();
b.incrZ();
}
}
|
1 2 3 1 2 1 1 1 1