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.
To learn more about Java Programming , Interface, Inheritance, Computer etc.
Call us @ 9825618292
Visit us @ www.tccicomputercoaching.com
In alternate of multiple inheritance java support interface.
To learn more about Java Programming , Interface, Inheritance, Computer etc.
Call us @ 9825618292
Visit us @ www.tccicomputercoaching.com
No comments:
Post a Comment