Difference between type inheritance and implementation inheritance

2

My teacher passed a tutorial on Object-oriented Data Structure with Java and in the handbook there is an excerpt (without deepening) that reads as follows:

  

"Interface promotes inheritance type and non-inheritance of   Implementation; "

What's the difference between these two types of inheritance?

    
asked by anonymous 06.05.2018 / 03:12

1 answer

3

This workbook is out of date, now interface can have implementation .

Type inheritance is to assume the contracts that one type offers, ie to have all the methods with their signatures

a> of a type into a new type. The type inherits what has already been declared in another type.

Implementation inheritance receives the algorithm, the code that executes on the methods, and can even receive implementation details such as type fields. Interface has never been .

The implementation inheritance has to do with object orientation. The inheritance type has to do with static typing, or at least typing securely.

This can be useful .

    
06.05.2018 / 04:26