What is the difference between
ArrayList<Object> al = new ArrayList<Object>(100);
and
Object[] ar = new Object[100];
Is there any difference in the internal implementation i.e. the allocation in the memory?
Do both internally reserve 100 slots in the memory?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…