Multiple choice technology programming languages

clone method used for..???

  1. Used for Cloning or copying integer var

  2. Used for Cloning or copying float var

  3. Used for Cloning or copying String var

  4. Used for Cloning an array

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

The clone() method in Java is commonly used for creating copies of arrays. While arrays can also be cloned using other methods, the clone() method provides a straightforward way to duplicate array contents.