fork download
  1. interface Foo<X> {
  2. <T extends Foo> T bar();
  3.  
  4. public static void main(String[] args) {
  5. Foo foo = null;
  6. String baz = foo.bar();
  7. }
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:6: error: incompatible types: Foo cannot be converted to String
        String baz = foo.bar();
                            ^
1 error
stdout
Standard output is empty