请看以下代码,为什么不能编译呢
[code="java"]
import java.util.*;
public class GenerClass {
/**
* Creates a new instance of <code>GenerClass</code>.
*/
public GenerClass() {
}
//just for testing
public static <E extends Number> List<? super E> process(List<E> nums)
{
return null;
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
List<Integer> input = new ArrayList<Integer>(0);
List<Integer> output = process(input);
}
}[/code]
编译的时候出错,说不兼容的类型。问题应该出自output的类型,但不知道为什么这样写会出错。请各位仁兄帮手解答。