Java OOPs Concepts-4
Java OOPs Concepts-4
Object-Oriented Programming or Java OOPs concept refers to programming languages that use
objects in programming. They use objects as a primary source to implement what is to happen in the
code. Objects are seen by the viewer or user, performing tasks you assign.
Java Class
A Class is a user-defined blueprint or prototype from which objects are created. It represents the set
of properties or methods that are common to all objects of one type.
Java Object
An Object is a basic unit of Object-Oriented Programming that represents real-life entities. A typical
Java program creates many objects, which as you know, interact by invoking methods.
1. Abstraction
Data Abstraction is the property by virtue of which only the essential details are displayed to the
user. The trivial or non-essential units are not displayed.
2. Encapsulation
It is defined as the wrapping up of data under a single unit. It is the mechanism that binds together
the code and the data it manipulates.
3. Inheritance
Inheritance is an important pillar of OOP. It allows one class to inherit the features (fields and
methods) of another class.
4. Polymorphism
It refers to the ability of object-oriented programming languages to differentiate between entities with
the same name efficiently.
Conclusion
The Object Oriented Programming (OOPs) concept in Java is a powerful way to organize and write
code. By using OOPs concepts like inheritance, encapsulation, and polymorphism, programmers
can build complex applications more efficiently, making the code easier to manage, understand, and
modify.