• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between instantiation and initialization objects

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please tell me the difference between instantiation of an object and initialization of an object with simple example.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic