Why Java does not support multiple inheritances? tccicomputercoaching.com
- June 29, 2019
- Posted by: Riddhi Dhandha
- Category: Java course at TCCI
The main reason is that when we declared a same method in different class and at the time of calling the method present at these classes the compiler gets confused which class method would be called so this may result the ambiguity occur in program and compiler throw a compile-time error. This is the main reason that java doesn’t support multiple inheritance.
In alternate of multiple inheritance java support interface.
Call us @ 9825618292
Visit us @ www.tccicomputercoaching.com