Introduction Of OOPS Concept In Java
In Java, OOPS is very important concept. Let’s first understand,
What is OOPS?
OOPS stands for object oriented programming language. OOPS is a prototype, which provides many features that are,
- Object
Object is an entity, which has state and behavior like mobile, pen, bike, car etc. An object is an instance of a class. We can create many instance of a class. - Class
A class is a blueprint or a template, where we define an object, data fields and methods. - Inheritance
When one class acquires all the properties and behavior of another class is called inheritance .In other words, when child class takes all the properties and behavior of parent class is also known as inheritance. When we use basically for code reusability and with the help of it, the information is easily manageable. - Abstraction
Abstraction is a process in which we hide the implementation details and only shows the functionally to the user. For example, mobile phone users knows only functions of mobile and not the internal details. They don’t know that how it works internally. - Encapsulation
In encapsulation, we wrap the code and data simultaneously into a single unit. It is basically used for data hiding from other classes and it can be accessed only through the method. - Polymorphism
Polymorphism has a capability to perform a task by several different ways. We use the method overloading and method overriding to do polymorphism. For example, one human being plays many role in their life as a different way like a brother, father, son and husband.
Java is an object programming language. The object oriented programming is a methodology. In this, all things are described as an object. In OOPS design, a code uses objects and classes.
Summary
Thus, we learnt Java is an Object programming language. The Object oriented programming is a methodology. In this, all things are described as an object and also learnt its concepts.