我希望你能帮我翻译一下Java中与整数向量数组有关的内容。如果我输入:
Vector<Integer>[] matrix;
matrix = new Vector<Integer>[100];
我得到了编译错误
无法创建 Vector 的通用数组
我应该使用什么?
matrix = new Vector[100];
应该使用什么代替?(这会导致一个警告)
或者我应该不适用向量数组,改用向量嵌套向量呢?
注意:我不想要 Vector< Integer >,我想要 Vector< Integer >[] 来创建一个整数矩阵而不使用 Integer[][].
List
而不是Vector
。你不用数组的数组或者列表的列表,有什么特殊的原因吗? - Matt Ball