File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Elasticsearch in Action
this week in the
class.newInstance() Vs object.clone()
Joined: Apr 08, 2004
Feb 28, 2010 22:31:03
class.newInstance() creates new instance dynamically and object.clone() creates the replica object. What is the difference(both are used for creating instances)?
Joined: Jul 26, 2007
Feb 28, 2010 23:21:56
Did you fully read the API docs for Object#clone() ? What would happen if you invoke the clone() on an object?
How to ask questions
Donate a pint, save a life!
Onff-turn it on!
subject: class.newInstance() Vs object.clone()
creation of object
how many type or how many kind of way we can create an object in java??
ways of instantiation
Using Class.forName() with constructor arguments
class Class and class literals
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015