【发布时间】:2021-01-16 22:56:07
【问题描述】:
public class Sortieralgorithmen<T extends Comparable <T>>
{
public static void main (String[] args) throws IOException
{
UserInput read = new UserInput();
ArrayList<Integer> list = read.type(muster, type, length, rounds);
ArrayList<T> list = read.type(muster, type, length, rounds);
}
}
为什么第一个有效而第二个无效?
type 是类UserInput 中的一个方法。在那里我将填充数组。
【问题讨论】:
标签: java list generics arraylist