Java Object Oriented Programming
Object-Oriented Programming tries to map code instructions with real-world, making the code short and easier to understand.
With the help of OOPs, we try to implement real-world entities such as object, inheritance, abstraction, etc.
OOPs helps us to follow the DRY(Don't Repeat Yourself) approach of programming, which in turn increases the reusability of the code.
Two most important aspects of OOPs - Classes & Objects :
1. A class is a blueprint for creating objects.
2. Classes do not consume any space in the memory.
3. Objects inherit methods and variables from the class.
4. It is a logical component.
1. An object is an instantiation of a class. When a class is defined, a template (info) is defined.
2. Every object has some address, and it occupies some space in the memory.
3. It is a physical entity.
How to model a problem in OOPs
We identify the following: