File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Question on inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Question on inner class" Watch "Question on inner class" New topic
Author

Question on inner class

Dinesh Tahiliani
Ranch Hand

Joined: Aug 06, 2007
Posts: 486
Inside an Inner Class, you cannot access the Enclosing Class's members by using 'this' keyword. The correct way is either use the member name plainly OR EnclosingClass.this.memberName


Can you explain me the meaning of this sentence please with help of example


Thanks<br />Dinesh
Bhavik patel
Ranch Hand

Joined: Feb 20, 2007
Posts: 49


Bhavik Patel
Glassfish Consultancy service At http://www.jmatrix.in
Bhavik patel
Ranch Hand

Joined: Feb 20, 2007
Posts: 49
Sorry friend....I have removed example from this post. Please refer to next post.
[ June 24, 2008: Message edited by: Bhavik patel ]
Dinesh Tahiliani
Ranch Hand

Joined: Aug 06, 2007
Posts: 486
Thanks got it ..

Does similarly aplies of oter class methods also
Can inner access the outer class methods.

Please explain with example
Bhavik patel
Ranch Hand

Joined: Feb 20, 2007
Posts: 49
Yes. It applies to all the non-static members of outer class.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on inner class