Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects that contain data (fields) and behavior (methods). It focuses on designing software that closely represents real-world entities. It is used to:
Improves code reusability
Enhances maintainability and scalability
Makes programs easier to understand and manage
Closely models real-world entities
Characteristics of OOP
Class
A Class in Java is a blueprint or template used to create objects. It defines the properties (data) and behaviours (methods) that objects of that class will have.
Object
An Object in Java is an instance of a class that represents a real-world entity. It is used to access the variables and methods defined inside a class.
Inheritance
Inheritance is a core OOP concept in Java that allows one class to acquire the fields and methods of another class using the extends keyword. It represents an relationship between classes.
References:

Top comments (0)