Rec 05
Problems
01. Stack and Heap with nested class
class B {
int x = 1;
void f() {
int y = 2;
class A {
void g() {
B.this.x = y; // <--
}
}
A a = new A();
// Line A
a.g();
}
}
02. Write an immutable class
Tips
Last updated