fork download
  1. import java.util.List;
  2.  
  3. class Ideone {
  4.  
  5. static abstract class A {
  6.  
  7. abstract List m1();
  8.  
  9. abstract List<List> m2();
  10.  
  11. }
  12.  
  13. static class B extends A {
  14.  
  15. List<?> m1() {
  16. return null;
  17. }
  18.  
  19. List<List<?>> m2() {
  20. return null;
  21. }
  22.  
  23. }
  24.  
  25. public static void main(String[] args) {
  26. System.out.println("Yo.");
  27. }
  28.  
  29. }
  30.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:13: error: B is not abstract and does not override abstract method m2() in A
	static class B extends A {
	       ^
Main.java:19: error: m2() in B cannot override m2() in A
		List<List<?>> m2() {
		              ^
  return type List<List<?>> is not compatible with List<List>
2 errors
stdout
Standard output is empty