Multiple inheritance in Java example -


consider following scenario: have 2 interfaces a , b. both interfaces have member function display().

public interface {    public function display() {    } }  public interface b {    public function display() {    } }  class c implement a, b {    public function display{        //definition here    } } 

i want know

  1. how many display() functions available in class c?
  2. if there 1 member function, how possible?

a brilliant explanation at: implementing 2 interfaces in class same method. interface method overridden?

if type implements 2 interfaces, , each interface define method has identical signature, in effect there 1 method, , not distinguishable. if, say, 2 methods have conflicting return types, compilation error. general rule of inheritance, method overriding, hiding, , declarations, , applies possible conflicts not between 2 inherited interface methods, interface , super class method, or conflicts due type erasure of generics.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -