Object-oriented programming (OOP) is a programming paradigm that emphasizes the use of objects and classes. In Java, there are four major OOP concepts: data encapsulation, data abstraction, inheritance, and polymorphism.
Encapsulation: Bundles data and methods into a single unit (class), hiding internal details.
Inheritance: Allows a class to inherit properties and behaviors from another class, fostering code reusability.
Polymorphism: Enables objects of different classes to be treated as objects of a common superclass, facilitating flexibility in method implementation.
Abstraction: Focuses on essential details while hiding unnecessary complexities, simplifying the design and implementation of classes.