Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects.The four main principles of OOP are encapsulation, inheritance, polymorphism, and abstraction.A class in Java is a blueprint or template for creating objects. It defines the properties and behaviors of an object.An object in Java is an instance of a class. It has state (data) and behavior (methods).