JAVA:
Java is an Object Oriented Language. That has the feature of Object Oriented language like:
Polymorphism
Inheritance
Encapsulation
Abstraction
Classes
Objects
Instance
Method
Message Parsing
Object - Objects have properties/states and action/behaviors.
If we consider a real world we found many objects around us like car, dog, human etc. All these objects have properties & action. Without properties & action their is no real existence of object.
Example: If we consider a dog then its
Properties/state is-
- Name
- Color
- Breed
Action/behavior-
- Barking
- Eating
- Running
- Wagging
If we compare the S/W objects with real world object, they have similar characteristics. S/W objects also have properties & actions.
- Properties/states are stored as variable/field.
- Action/behavior is shown via methods.
No comments:
Post a Comment