2 ms·
They can read and modify object fields in their outer class's instance. But it's true they can't modify stack variables. This makes contextual sense - C blocks
by JulianMorrison 17y ago
They can read and modify object fields in their outer class's instance. But it's true they can't modify stack variables. This makes contextual sense - C blocks are being stack allocated and have to be explicitly copied to the heap. Java inner instances get copied immediately, because everything lives on the heap in Java.