|
What are the security concerns of cloning an object?
Java Interview Questions for Cloning and Cloneable
(Continued from previous question...)
What are the security concerns of cloning an object?
The private members of the source object are also cloned when cloning the object. Thus clone() method should be overridden judiciously and deep cloning can be used to control the cloning process. Also proper attention should be given to clone method if the class extends Thread or implements Runnable
(Continued on next question...)
Other Interview Questions
|