Multiple choice technology programming languages

what a Clone method returns in ArrayList?

  1. Returns String

  2. Returns an Array

  3. Returns a shallow copy of this ArrayList instance

  4. Returns Void

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The clone() method in ArrayList returns a shallow copy - the ArrayList object itself is new, but the elements are references to the same objects (not deep copies). It doesn't return a String, Array, or void.