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
Nesta página do site você pode assistir ao vídeo on-line What is OOPs concept in JAVA duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Try2Catch 07 Janeiro 2018, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 343 vezes e gostou 36 espectadores. Boa visualização!