Possible Duplicate:
Java how to: Generic Array creation
I am using tons of ArrayLists in my program that does not need most of the functionality of Java arraylist, so basicly i want to implement it myself to get better space performance.
这是迄今为止的事情:
public class ArrayList<E> {
private E[] a;
private int size=0;
public ArrayList() {
}
public ArrayList(int fixedSize) {
***a=new E[fixedSize];***
}
}
编辑们说,我可以创造一种通用的阿雷拉,这怎么说?