This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Doubt in accessing member variables of called object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Doubt in accessing member variables of called object" Watch "Doubt in accessing member variables of called object" New topic
Author

Doubt in accessing member variables of called object

sridevi kumar
Ranch Hand

Joined: Oct 17, 2001
Posts: 31
Hi,
Suppose there are two classes Server and B.

Could anyone help me to fix this problem. I have similar problem at work. Thanks a lot...
[This message has been edited by Cindy Glass (edited November 01, 2001).]
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Assuming they are in the same package, hence visible to each other, create an instance of the Server class in your method and use it.
Server s = new server()
String str = s.getStatus()
s.setStatus("someString")

Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Doubt in accessing member variables of called object
 
Similar Threads
Nullpointer exception in servlet
Mapping enum in JPA/Hibernate
Inheritance - how many objects created???
ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
error....