Monday, 15 June 2015

java - Multiple inheritance of interfaces -



java - Multiple inheritance of interfaces -

this question has reply here:

why there no multiple inheritance in java, implementing multiple interfaces allowed 9 answers

just little confusion. java not allow multiple inheritance. how can interface extend more 1 interfaces? can phone call inheritance?

an interface extending multiple interfaces not constitute multiple inheritance. since not inheriting functionality.

public interface { public void dosomething(); } public interface b { public void dosomething(); } public interface c extends a, b { }

is absolutely fine, since end single interface (effectively) 1 method:

public interface c extends a, b { public void dosomething(); }

java oop inheritance interface multiple-inheritance

No comments:

Post a Comment