• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to communicate two objects in java

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
pls rep to this query,

thank u in advance.
 
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I doubt you will receive an accurate answer when your question is so vague. I can think of at least three different interpretations of the question. Please post your question again, stating exactly what you mean and what you have already considered as possible answers.
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could communicate between two objects.
Probably a little more info on what you are trying to achieve.

By the way, do could use
1. RMI (if they reside on different machines)
2. on same machine, same JVM

Read about Serialization if it distributed environment.
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with the above. You need to provide more information in order for us to help you.

My first guess is that you can do something as simple as "objectA.method(aParameter);" in any method, whether it is in the same class as objectA's type or not. Of course, without knowing the exact details of your project, I cannot provide any additional details to your question. In fact, I'm not entirely sure if this even answers your question since the above suggestions about RMI and such are equally valid. Please provide a description of what you are trying to do so we can help you.

Layne
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Inheritance
Interface
super()
import

these are just some that I know for now
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic