Referring to
Here is some sample code and I need to find out which "this" are we referring to? Is it the Outer class or Inner class? and how do we refer to the other this? Any help will be greatly appreciated. Thanks
public class Outer {
private int x;
private Inner inner;
class inner extends Thread
{
public void run()
{
synchronized(this) //which this are we referring to outer or inner?, how can we refer to the other this?
{
//do something
}
}
}
}

