What are the Concept of oops in JAVA ?

Overview Of  OOP

OOP is a technique that combines data and instruction for processing the data into an object which can be used in the application program.

OOP provides a concept that helps to model complicated System of real-world into a software solution. It provides many concepts such as inheritance, data binding, polymorphism, and so on. 

JAVA is an Object Oriented Programming language, you can easily create and use classes & object in JAVA.

Concept of OOP

What are Concept of oops in JAVA ?
Concept of OOP


1 )- object :-  Object is anything in the real world that contains some unique characteristics. It has state & behavior, it may be physical & logical.

Ex :-
           mouse, keyboard, chair, table & pen. 

2 )- class :-  The class is a collection of objects. It is a logical entity that has some specific attributes and methods.

Ex :-
          If  you have student class then  you should contain an attribute and method some of the student class attributes are name, phone no., etc. a class can have multiple attribute.

Method :-  The  Method is defined as a group of statements enclosed together to achieve specific task. It is associated with an object, methods is not unique to a class instance.

3 )- inheritance :- It can be defined as a group of statement enclosed  together with different properties and behavior a feature of one class can be share with another class through inheritance. it means that that the properties and the behavior of the parent class can be share to child class which is also known as derived class.

4 )- polymorphism :- It is the ability to present same interface for different underline forms.
Polymorphism refers to the ability of a variable, object, or function to take on multiple forms
Ex :-  in English, the verb run has a different meaning if you use it with a laptopa foot race, and business. Here, we understand the meaning of run based on the other words used along with it. The same also applied to Polymorphism.
Poly means many & morph means form.

5 )- Encapsulation :- Encapsulation is an OOP technique of wrapping the data and code. In this OOPS concept, the variables of a class are always hidden from other classes. It can only be accessed using the methods of their current class
It is used to restrict access to methods and variables.
ex:- in school, a student cannot exist without a class.

6 )- Data Abstraction :- Hiding the implementation details is called data abstraction. It is an almost a similar concept to encapsulation as data abstraction is achieved through encapsulation only.



Post a Comment

3 Comments