wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Difference between instantiation and initialization objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Difference between instantiation and initialization objects" Watch "Difference between instantiation and initialization objects" New topic
Author

Difference between instantiation and initialization objects

sureshreddy puli
Greenhorn

Joined: Sep 28, 2005
Posts: 29
Please tell me the difference between instantiation of an object and initialization of an object with simple example.
Kenneth Albertson
Ranch Hand

Joined: Sep 18, 2005
Posts: 59
Hi sureshreddy. You won't learn as much if I just tell you the answer. Instantiation is the creation of an instance, ie an object. Initialization is what it says, the setting of initial values. Have a look at the discussions of those two topics in the materials you are learning from. Then you can post your explanation and example, and someone will tell you if your answer is correct.
Naveen Vooka
Greenhorn

Joined: Oct 13, 2004
Posts: 25
Instantiation: The mechanism whereby objects are created from a class description.
Example: http://www.cse.buffalo.edu/faculty/bina/java/java/sld015.htm

Initialization: This is the value assigned to a variable when it first defined.
Example: http://www.artima.com/designtechniques/initializationP.html
http://www.javaworld.com/javaworld/jw-11-2001/jw-1102-java101.html

--------------
Naveen Vooka
www.devsquare.com
DevSquare - Online Application Development
 
GeeCON Prague 2014
 
subject: Difference between instantiation and initialization objects