OOPs Concept in Java
a thread...
OOP Concepts are very common in Software Engineering.
All the OOP languages like Java, Python, C++, .Net, etc. have this concept.
In this thread, we'll try to understand it from Java's standpoint.
There are six different concepts in OOP:
1. Object
2. Class
3. Inheritance
4. Encapsulation
5. Abstraction
6. Polymorphism
Let's understand them one by one...
Object:
Look around you, whatever you see can be considered an Object.
For eg: The chair you are sitting on, the table, your computer, your house, windows, your pet, you yourself!
An object has Behaviour (things it does or performs) and Attributes (things that describe it).
Example:
Note: B = Behavior, A = Attribute
Chair:
B - Moves, Adjust Height, Recline, etc.
A - Built Material, Color, Make & Model, Brand, Price, etc.
You:
B - Eat, Play, Watch Netflix, Sleep, etc.
A - Height, Weight, Age, DOB, Name, SSN, etc.