Code: Select all
As there is no conflict, the compiler figures out that 'i' is actually Outer.this.i.
Moderator: admin
Code: Select all
As there is no conflict, the compiler figures out that 'i' is actually Outer.this.i.
Code: Select all
public class Outer
{
int i = 10;
class Inner
{
int i = 20;
public void methodA()
{
i = 30;
//line 1.
}
}
}
Users browsing this forum: No registered users and 2 guests