Bookmark Topic Watch Topic
  • New Topic

Java

 
Bushra Fathima
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Report post to moderator
How can i get the value stored in the member variable of one class in another class of the same package.
 
Rob Spoor
Sheriff
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please Use A Meaningful Subject Line. Most of this entire board is about Java, so using that as the subject line is not meaningful.
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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();
 
Campbell Ritchie
Sheriff
Pie
Posts: 49813
69
  • Mark post as helpful
  • send pies
  • Report post to moderator
You see the confusion you are causing by asking the same question twice. Closing thread as a duplicate.
Please continue here.
 
    Bookmark Topic Watch Topic
  • New Topic