What is OOPs concept in JAVA

Veröffentlicht am: 07 Januar 2018
auf dem Kanal: Try2Catch
343
36

OOPs Concept

Inheritance: When one object acquires all the properties and behaviors of parent object i.e. known as inheritance. It provides code re usability.

Inheritance having two types (Inheritance) IS-A and (Composition) HAS-A:

IS-A: This relationship is easy to identify. In real world, car is a vehicle. Car extends all the properties of vehicle and implements vehicle’s behavior. In java world, where ever extends and implements keyword is used with class name, defines IS-A relationship.

This relationship is uni-directional. Means, Car is vehicle but a vehicle never be a car.

HAS-A: In real world, car has AC, stereo etc from car accessories. In java world, when any instance variable use in some other class known as HAS-A relationship.

Poly morph-ism: It is very simple to understand, one name but many forms. Like in real world, we have bicycles. But, there are so many types of them. Only having little changes and there functionality is totally changed just because of some of having gear, light, GPS etc. In java world, overloading and overriding are example of poly morph-ism.

Encapsulation: This is known as binding or wrapper data together into a single unit. The best and simple example is capsule, having different type of medicine into a single capsule. In java world, bean class is best example of encapsulation. All the members are in a single class and all are private.


Abstraction: Hiding internal details and showing functionality is known as abstraction. Like we have car we always drive but don’t know how it starts. In java world, we use abstract classes and interface to implement abstraction.

Facebook :   / try2catch  
Blog : http://trycatch55.blogspot.in
WhatsApp- http://bit.ly/31ZdBM1


Auf dieser Seite können Sie das Online-Video What is OOPs concept in JAVA mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Try2Catch 07 Januar 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 343 Mal angesehen und es wurde von 36 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!