多选题
What is the value of the size variable at the completion of this code
segment?
ArrayList <Object> sampleArrayList = new ArrayList
<Object>();
sampleArrayList.add(new Object());
sampleArrayList.ensureCapacity(15);
sampleArrayList.add(new
Object());
int size = sampleArrayList.size();
- A. 0
- B. 1
- C. 2
- D. 10
- E. 15
- F. A compile time error will be generated.
- G. A runtime exception will be thrown.