+ 2

Which methods ConcreteClass needs too implements???

public interface Interface_X{ public int methodX(int x); } public interface Interface_Y extends Interface_X{ public void methodY(String z); public int methodX(int y); } public interface Interface_Z extends Interface_X{ public void methodX(String x); public int methodX(int y); } public abstract class AbstractClass implements Interface_Z, Runnable { public abstract int methodX(): public int methodX(int c){} } public class ConcreteClass extends AbstractClass{ // which methods ConcreteClass needs too implements }

5th Feb 2020, 5:21 PM
Erion Zabelaj
Erion Zabelaj - avatar
3 Réponses
+ 1
Not sure but these look some of them- public int methodX(){} public void methodX(String x){} public void run(){}
5th Feb 2020, 5:41 PM
Avinesh
Avinesh - avatar
0
Yes. All the methods need to be implemented which are available to immediate super class as abstract methods..
5th Feb 2020, 6:44 PM
Jayakrishna 🇮🇳
0
+ in AbstractClass it needs return public int methodX(int c){} and semicolon instead colon
5th Feb 2020, 7:32 PM
zemiak