+ 1
why is this not wotking?
public class main { public static void main(String[] args) { rodon n1 =new rodon(1,4); rodono r1 = new rodono(6); } } public interface rodo { public void rodo(); public void romeno(); } public class rodon implements rodo { rodon(int n, int t) { System.out.println("rodon"); } } public class rodono extends rodon { rodono(int n) { System.out.println("rodono"); } }
1 ответ
0
Your not implemented interface methods anywhere in rodon class but add implements rodo.
You should provide implementations or make abstract class..
In Then case also still you cannot create objects until you provide implementations for interfaces....