File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 19543
    
  16

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
How To Ask Questions How To Answer Questions
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

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: 36499
    
  16
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
 
Similar Threads
can non-static inner class access any member
Doubt about diagram class (realization)
andrew has wii
Doubt about diagram class
WA #1.....word association