Question: Scala bytecode can run on top of Java VM. What is the fundamental difference between Java object.clone() and Scala object.copy()?
- One is a Java object, the other is a Scala object.
- clone() will copy class structures but not the data, while copy() will also copy data into new objects.
- There is no difference.
- copy() allows you to change values during the copying process; clone() does not.
Answer: The correct answer of the above question is Option D:copy() allows you to change values during the copying process; clone() does not.