Basic Concept of Object Oriented Programming (OOP) in Java
CLASS
- A class is a collection of Common properties and Common actions of group of objects.
- A class can be considered as blue print or a plan for creating an object.
- For a class , we can create any number of objects.
OBJECT
- An Entity that exist physically in real world which require some memory will be called as an object
- Every object will contain some "properties" and some "actions".
- Actions are the tasked performed by the object they are represented by methods
ENCAPSULATION
- Encapsulation is the process of binding the variables and methods into single Entity.
- Wrapping of variable(data) and methods(code) into single unit.
ABSTRACTION
- Abstraction refers to hiding the implementation details of a code and exposing only the necessary information to the user.
INHERITANCE
- Inheritance is the process of acquiring the members from one class to another class
POLYMORPHISM
- If Single entity shows multiple behaviours,then it is called as "Polymorphism"
- (eg): Method Overloading and Method Overriding