943,782 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 6651
  • Java RSS
Mar 31st, 2004
0

Working with objects of different Classes

Expand Post »
Ok, this is an extremely stupid question, and I feel retarded for asking, considering how much I've been studying Java. But anyways, here goes.

Let's pretend I've created three classes, Class A, Class B, and Class C. Now in A I create an instance of Class B, let's call it AB. And I modify AB's variables, and invoke methods on it. Object AB holds valuable info, say for a database. Now in C I create another instance of Class B, I'll call it CB. From class C, is there any way I can specific information, such as instance vairable values and other such things of object AB (in class A)?

That's my quesiton. Thanks for any help
Similar Threads
Reputation Points: 46
Solved Threads: 2
Junior Poster
Iron_Cross is offline Offline
117 posts
since Jul 2003
Apr 1st, 2004
0

Re: Working with objects of different Classes

you can make an interface for this, or you can create accessor methods in AB and call those.
Reputation Points: 28
Solved Threads: 9
Posting Whiz in Training
BountyX is offline Offline
222 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: String Tokenizer Help
Next Thread in Java Forum Timeline: Converting arrays to link lists





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC