Back-End/Java_1

[Java] Inheritance in Java

리딩리드 2016. 8. 23. 17:11

Inheritance in Java

- Inheritance is a mechanism in which on object acquires all the properties and behaviors of parent object

- For method Overriding(so runtime polymorphism can be achieved)

- For code reusability


1. Example



2. Why multiple inheritance is not supported in java?

- To reduce the complexity and simplify the language