• Post Reply Bookmark Topic Watch Topic
  • New Topic

Object talking with other objects  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I don't understand, how a object communicate with another object where both object from different class. I mean, how a object "a" created from class "X" will communicate with object "b" which created from class "Y".
 
Saloon Keeper
Posts: 7993
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code in one class can call accessible methods in other classes. Is there something specific you don't understand?
 
kazi Shahin
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
Can you show me a small example? How object communicate each other, where both from different class.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kazi Shahin wrote:Thanks.
Can you show me a small example? How object communicate each other, where both from different class.


Almost every line you'll ever write is one class communicating with another. Have you ever written any Java code at all? Even Hello World?


In that line, your class is communicating with the System class, and also with the java.io.PrintStream class.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!