3 ms·
I am not very familiar with Java details. Can you explain why this doesn't compile?
by ufo 15y ago
I am not very familiar with Java details. Can you explain why this doesn't compile?
- finnw 15y agoIt's this part: int i; { int i; } Java does not allow you to shadow one local variable with another. This is ok: { int i; } int i; because the scopes do not overlap. This is ok too: int i; { class LocalClass { public void method() { int i; } } }