• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

access a private member

 
Lee Xu
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try reading the following link, the private section
http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a simple example.
 
Lee Xu
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your prompt reply.
Lee
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic