OOps Concept in Java
Posted By : Manish Kumar | 29-Sep-2017
OOPS (Object Oriented programming) is a conceptual programming strategy that is associated with the Classes and Objects and in that various other concepts are used like Inheritance, Polymorphism, Abstraction, Encapsulation etc.
Briefing this concept for a basic knowledge is as below:
1) Abstraction: Abstraction is the strategy in which a developer performs the action with the help of subclasses but do not shows the internal actions, this strategy has only declaration part but implementation part is missing.
2) Encapsulation: Encapsulation is a technique, by using which developers performs the abstraction and for doing this, Java provides some access modifiers which helps the user to bound the elements in different scopes and those modifiers are Private, Public, Package, and Default.
Where Private, Public and Package are used as keywords and for default is already taken as by-default
Polymorphism: If a user/developer need an object to be behaving differently at different times so he/she uses java technique polymorphism, which means one name but different forms.
Also, it is divided into two parts: 1) Compile time polymorphism and 2)
1) Compile time polymorphism is achieved by using method overloading concept and user just need to change the arguments and the method name is same.
2)
Due to this,
Inheritance: This OOPs technique in
In this, we use "extends" keyword followed by parent class name.
Other OOP's concepts are Association, Aggregation, and composition.
Thanks !
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Manish Kumar
Manish is Adaptive and passionate to learn new technical skills, have knowledge of testing and love to play badminton in free time