Overvieew
Object-Oriented Programming (OOP) is a programming paradigm that revolves around the concept of “classes” and “objects.” It is a way of designing and organizing code to promote modularity, reusability, and maintainability.
OOPS concepts helps reduce code complexity and enables the reusability of code
Imagine you have a toy robot. The object here is the robot, and it has information about itself (like color, size) and things it can do (like walk, talk). OOP helps us bundle up this information and actions together.
OOP is like building with LEGO blocks. Each LEGO block is like a small part of your code. You can reuse these blocks to build different things. In OOP, this means you can reuse your code for different parts of a program, making it easier to create and fix things.
It’s also like making a recipe for your favorite dish. The recipe is like a blueprint (class), and each time you follow it, you get a delicious meal (object). OOP helps us make these blueprints and create many instances of the recipe.
So, OOP is a way of coding that keeps things organized, lets you reuse your code, and helps you represent real-world things in your programs.
What is OOPS
A modular approach where data and functions can be combined into a single unit known as an object. It emphasizes data and security and provides the reusability of code. Using OOP, we can resemble our code in the real world.
List of Java OOPs Concepts
The following are the concepts in OOPs :
- Object
- Class
- Data Hiding
- Abstraction
- Encapsulation
- Inheritance
- Coupling
- Cohesion
- Association
- Aggregation
- Composition
- Polymorphism
FOUR Pillar of OOPs in Java
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism