Can anyone run this program and tell me the output i am getting unresolved compilation problem.But in K&B book pg:643 it's copiled and gave the out put ?solve this problem...
code:
class MyOuter{
private int s=7;
public void makeinner(){
MyInner in=new MyInner();
in.seeouter();
}
public class MyInner()
{
public void seeouter(){
System.out.println("outer s:"+s);
System.out.println("inner ref is:"+this);
System.out.println("outer ref is:"+MyOuter.this);
}
}
public static void main(
String a[]){
MyOuter.MyInner in=new MyOuter().new MyInner();
in.seeouter();
}
Thanks in advance....