+ 2

What is the use of ' inherintance ' in java ?

please upvote and comment

24th Feb 2017, 1:19 PM
Salih Ac
Salih Ac - avatar
2 Respuestas
+ 6
Inheritance is the process that enables one class to acquire the properties (methods and variables) of another. With inheritance, the information is placed in a more manageable, hierarchical order. like making one class and put some methods in it and we need this methods in other class in this case we use inheritance.
24th Feb 2017, 1:24 PM
Michael Ehab Mikhail
Michael Ehab Mikhail - avatar
+ 3
also You have polymorphism. object have more than one type. it is of his class, parents classes and implemented interfaces by self and parents. with this You can have a list of parent class but with instances of different sub classes
25th Feb 2017, 4:16 AM
cuarti
cuarti - avatar