This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between instantiation and initialization objects

 
sureshreddy puli
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell me the difference between instantiation of an object and initialization of an object with simple example.
 
Kenneth Albertson
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic