fork(1) download
  1. interface Point {}
  2.  
  3. class PointCloud<T extends Point> { }
  4.  
  5. class PointCloudReader<T> extends PointCloud<T>
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. System.out.println("Hi");
  10. }
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:5: error: type argument T#1 is not within bounds of type-variable T#2
class PointCloudReader<T> extends PointCloud<T>
                                             ^
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in class PointCloudReader
    T#2 extends Point declared in class PointCloud
1 error
stdout
Standard output is empty