This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes access a private member Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "access a private member" Watch "access a private member" New topic
Author

access a private member

Lee Xu
Ranch Hand

Joined: Aug 24, 2001
Posts: 77
I know that the object can access the private member of another object of the same class, but forget the example. Can someone give a concrete example on this? Thanks.
Amir Ghahrai
Ranch Hand

Joined: Jun 19, 2002
Posts: 110
Try reading the following link, the private section
http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html


Amir
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
Here's a simple example.


Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
Lee Xu
Ranch Hand

Joined: Aug 24, 2001
Posts: 77
Thanks for your prompt reply.
Lee
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: access a private member
 
Similar Threads
Not so private
Access to private members
access private member
Question on protected
How to understand this sentence?