| Author |
class.newInstance() Vs object.clone()
|
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1300
|
|
|
class.newInstance() creates new instance dynamically and object.clone() creates the replica object. What is the difference(both are used for creating instances)?
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8430
|
|
|
Did you fully read the API docs for Object#clone() ? What would happen if you invoke the clone() on an object?
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
 |
|
|
subject: class.newInstance() Vs object.clone()
|
|
|