Hi Sunil,
could not find it in the documentation.
But it seems that you have to access methods of the outer class from the inner class through the <ClassName>.this.method() Syntax (You do not have to do that with member variables).
correct me if I am wrong.
Axel
I modified your code a little bit:
<code>
class A
{
void print() {System.out.println("print() outer");}
void print(int val) {System.out.println("print(int) outer");}
class B
{
void print() {System.out.println("print() inner"); }
void show()
{
print(); //same as this.print();
//print(1); // DOES NOT COMPILE
A.this.print(1); // this does W O R K
}
}
public static void main (
String args[]) {
A.B inner = new A().new B();
inner.show();
}
}
</code>
[This message has been edited by Axel Janssen (edited June 07, 2001).]