Issues with inheritance (java) -
i reading how java avoids deadly diamond of death, still have questions. if class inherits class , implements interface , each have method same prototype? or method same name, same arguments, different return types?
thank you!
what if class inherits class , implements interface , each have method same prototype?
if don't override inherited method, compiler assume it's class' implementation of interface method. may not correct. depends on superclass' implementation.
or method same name, same arguments, different return types?
you won't able implement interface method because compiler think trying overload superclass method different return type.
Comments
Post a Comment