Objects: An Introduction
Let's see how objects contain other objects and communicate with each other in this lesson.
We have seen an example before where we have created new objects and passed objects through methods.
If you have never used an object-oriented programming language before, you need to know the basic concepts first. After that, you can write your code.
First interaction with objects and classes
We have already known that Java is used to create software or web or mobile application. They are also a kind of software package, nonetheless.
The software is basically a bundle of many states and behaviors. The software can have hundreds and thousands of objects joined together in a way that they can communicate with each other to run the software perfectly. Therefore, an object is essentially made of some states and behaviors.
Suppose a Person object has states like ‘color of eyes’. We can change that state by one behavior, such as ...