answersLogoWhite

0


Best Answer

Communication between object

In java , objects communicate by message passing.

An object oriented program is nothing but a bunch of objects telling each other what to do". To pass a message to an object means that a call to a method of that object is placed.

An object by itself is not incredibly useful. In general, it takes more than one object to really do anything meaningful. Since multiple objects typically need to communicate with each other, it stands to reason that an OOP language such as Java must provide some kind of object communication mechanism.

Object: An object is a collection of data and the procedures (methods) that act on that data.

Java Messages:

Java objects use messages to communicate with each other. Messages simply tell an object what to do. In Java, the act of sending a message to an object involves calling one of the object's methods .

It is a common practice to pass additional information along with a message. This information is passed along with the message as message parameters. More specifically, the message information is passed into a method as method parameters.

Message passingis another way of saying "method calling." When an object sends a message to another object, it is really just calling a method on that object. The message parameters are really just the parameters to the method. The bottom line is that messages and methods are synonymous.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

By having some orange related treats such as jaffa cakes

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you communicate between object and object in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Major difference between c and java?

Java is object oriented, C is not...


What is the difference between java and object oriented programming?

java is a programming language/platform that embodies object oriented programming concepts. The question of what is the difference is like asking what is the difference between cars and a Volvo.


What is a java object?

A java object is a collection of methods and properties defined in the Java programming language.


Difference between java and C plus plus?

java is an advanced object oriented programming language than c++


What are the different between'a' and ''a in java string methods?

The difference between 'a' and "a" anywhere in Java is that 'a' is a primitive char type, while "a" is a String object.


What do sockets do in Java programming?

In Java programming sockets allow a communication link between programs. They communicate with the server to enable this process and allow communication over the network.


What language is completely object oriented c plus plus or java?

Java is the complete object oriented Programming Language as every thing in java is an object,


What are the differences between Java OOP and PHP OOP?

JAVA is an Object Based Programming Language. it doesn't provide multiple inheritance and operator overloading. while Object Oriented Lanuages provides both.


What is the difference between cc plus plus and java?

C is a procedure oriented language ,Where C++ & java are object oriented language.But java is platform independent.So generally C is called POP.C++ is called OOP.But java is OOP , which is platform independent.If java does not support primitive data type then it is called as pure object oriented language.


Can you initialize an object without constructor in java?

No. if you wish to create an object that you plan on using in a java program then the answer is NO. You cannot initialize an object of a Java class without calling the constructor.


Did java oriented language works on object?

Java is an object oriented language, and it works with classes and objects.


Why do you require a object in java but not in C?

Because Java is an object-oriented language and C is a procedural language.