What is the difference between instantiation & initialization?

Showing Answers 1 - 6 of 6 Answers

Sridhar

  • Jun 11th, 2006
 

Instantiation is process of creating object. Initialization is process of initialising values inside that object.

  Was this answer useful?  Yes

lakshmi

  • Jun 27th, 2006
 

Instance ation will not allocate memory, just a instance will be created.

Initialization will actually allocate memory.

  Was this answer useful?  Yes

Mamata Jagati

  • Dec 17th, 2006
 

The reference variable is that one where we r not using the new keyword e.g. Connection con; But Object is that where we r using new operatore.g Classname cs1=new classname

  Was this answer useful?  Yes

Prithviraj

  • Nov 9th, 2014
 

Initialization-Assigning a value to a variable i.e a=0,setting the initial values.
Instantiation- Creating the object i.e when u r referencing a variable to an object with new operator.

Code
  1. span style="font-style: italic;">//Declaration

  2. a=10;//Initialization

  3. // Instantiation where Integer is a class and int1 is reference variable

  4.  

  Was this answer useful?  Yes

Pankaj Sharma

  • Nov 17th, 2014
 

As below

Code
  1. span style="font-style: italic;">//

  2. Sample sam ;  // in case not final

  3.  

  4. Initialization  //

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions