抱歉我的英语不好提前。我有以下代码:
public class test<E> {
private test<E> element;
private E[] array;
private List<E> aList;
public static void main(String[] args) {
}
public test(E[] a_array) {
array = a_array;
}
public test<E> cut(Cut something_cut) {
String[] myStrings = new String[] {"Elem1","Elem2","Elem3","Elem4","Elem5"};
aList = Arrays.asList(array);
element = alist; // ??
return element;
}
}
如果可能的话,我想将List alist
分配给变量element
,以便我可以将其退回并在我的主页中使用它?