Limited access

Upgrade to access all content for this subject

Which of the following is an advantage of using an array list versus using an array?

A

An array list can have objects as its elements, but an array cannot have objects as its elements

B

You cannot modify elements in arrays, but you can modify array list elements

C

An array list adjusts its size automatically, whereas an array has a static size

D

It is not possible to encounter a NullPointerException when accessing an array list, but it is when accessing an array

E

An enhanced for loop can be used with an array list, but not with an array

Select an assignment template