OCA Java SE 8 Core Java APIs - OCA Mock Question Core Java APIs 1-9








Question

Which of the following are true? (Choose all that apply)

  1. An array has a fixed size.
  2. An ArrayList has a fixed size.
  3. An array allows multiple dimensions.
  4. An array is ordered.
  5. An ArrayList is ordered.
  6. An array is immutable.
  7. An ArrayList is immutable.
  8. An ArrayList is mutable.
  9. An array is mutable.




Answer



A, C, D, E. H. I.

Note

An array is not able to change size and can have multiple dimensions. An ArrayList can change its size.

Both an array and ArrayList are ordered and have indexes.

Array and ArrayList are not immutable. Their elements can change in value.