This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Java

Bushra Fathima
Greenhorn

Joined: Oct 22, 2008
Posts: 11
How can i get the value stored in the member variable of one class in another class of the same package.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20049
    
  30

Please Use A Meaningful Subject Line. Most of this entire board is about Java, so using that as the subject line is not meaningful.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10733
    
    9

Originally posted by Bushra Fathima:
How can i get the value stored in the member variable of one class in another class of the same package.


Welcome to the ranch. We are happy to have you here
The normal way to do this via a getter method.
e.g. public Object getValue();


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43399
    
  32
You see the confusion you are causing by asking the same question twice. Closing thread as a duplicate.
Please continue here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java
 
It's not a secret anymore!