An object is representing the real time object. For example, Car, pen, etc
It has two parts such as
Syntax:
Car c = new Car();
Here new----> memory operator.
Let us assume Car as the class.
Object------>realtime object such as wheel, steering, etc
Using Realtime object we can make some action is called as method...
Here brake is an object and applying brake is the method.
It has two parts such as
- State --------> Fields
- Behavior --------> Methods
Syntax:
Car c = new Car();
Here new----> memory operator.
Let us assume Car as the class.
Object------>realtime object such as wheel, steering, etc
Using Realtime object we can make some action is called as method...
Here brake is an object and applying brake is the method.
No comments:
Post a Comment