Java
Java
Java:- Java is an object-oriented programming language. Everything in Java is associated with classes
and objects, along with its attributes and methods. For example: in real life, a car is an object. The car
has attributes, such as weight and color, and methods, such as drive and brake.
Class:- Class is nothing but it is blueprint and collection of objects is known as class.
Object:- Any entity has that state and behavior is known has Object. An object can be defined as instance
Inheritance:- When one object acquires all the properties and behaviors of a parent object, it
is known as inheritance. It provides code reusability. It is used to achieve runtime
polymorphism.
Encapsulation:- Binding (or wrapping) code and data together into a single unit are known as
encapsulation.