what does the Object's clone() method return? Describe 2 cases
Answer
it returns a copy of the object of the correct (runtime) class and copies fields as if by (assignment) = operator if actual class implements Cloneable, otherwise it throws CloneNotSupportedException.
Tags
#bloch-effective-java-2ed #java
Question
what does the Object's clone() method return? Describe 2 cases
Answer
?
Tags
#bloch-effective-java-2ed #java
Question
what does the Object's clone() method return? Describe 2 cases
Answer
it returns a copy of the object of the correct (runtime) class and copies fields as if by (assignment) = operator if actual class implements Cloneable, otherwise it throws CloneNotSupportedException.
If you want to change selection, open document below and click on "Move attachment"