Object Oriented Programming (oops):
- Object-Oriented Programming (OOP) is a programming approach in which software is designed using objects that represent real-world entities, and these objects contain data (fields) and behavior (methods).
Class:
- Blueprints or templates for creating objects that define the structure and behavior of data.
Objects:
An object is a real-time instance of a class that represents a real-world entity and contains data (variables) and behavior (methods).
An object is an instance of a class in Object-Oriented Programming.
Inheritance:
- Inheritance is an Object-Oriented Programming concept in which one class (child/subclass) acquires the properties and methods of another class (parent/superclass).
- Inheritance supports code reusability and establishes a parent–child relationship between classes.
Encapsulation:
- Encapsulation is an Object-Oriented Programming concept that bundles data (variables) and methods into a single unit (class) and restricts direct access to the data.
Polymorphism:
- Polymorphism is an Object-Oriented Programming concept where the same method or action behaves differently based on the object that is calling it.
- Polymorphism improves flexibility by allowing the same method name to perform different tasks.
Abstraction:
- Abstraction is an Object-Oriented Programming concept that hides implementation details and shows only the essential features of an object.
Reference:
https://www.geeksforgeeks.org/dsa/introduction-of-object-oriented-programming/
https://www.w3schools.com/JAVA/java_oop.asp







Top comments (0)