aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Inner Class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Inner Class" Watch "Inner Class" New topic
Author

Inner Class

Wahid Sadik
Ranch Hand

Joined: Oct 30, 2000
Posts: 56
Can an inner class member have access to private member of its confininng class?
------------------

Regards<br />Mohammod Wahid Sadik<br />SCJP 1.2, SCJD 1.4,<br />IBM Certified XML Developer<br />IBM Certified UML Designer
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4092
    
    1
a "regular" inner class does yes.


SCJP
Wahid Sadik
Ranch Hand

Joined: Oct 30, 2000
Posts: 56
Randall, please explain. What is a "regular class?". Assume that I don't know anthing(that's not ture)
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4092
    
    1
sorry i knew i should have said that different. an inner class that is not static has access to all member variables. static inner class can access a private member variable too, but only if it is static as well.
Wahid Sadik
Ranch Hand

Joined: Oct 30, 2000
Posts: 56
Many thanks Rand... I got it now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner Class
 
Similar Threads
instantiating class issue
static final member
how to access Inner class member
Can I access private members of inner class
static members in inner classes