instantiate : Java Glossary

instantiate
The keyword "new" will allocate some RAM (Random Access Memory) and create a new object for you and initialise all its fields to zeros/nulls. The code in the various constructors then initialises the fields. This process of creating an object is called instantiation. When a method starts executing, all the local/temporary variables for that entire method (all embedded blocks too) are allocated slots on the stack. It does not wait until you actually enter a block. These local variables are not automatically initialised. Though the process is similar, the allocation of ram space for local variables is not usually referred to as instantiation. Methods other than constructors may return a newly minted object. The creation with new inside such a method is called instantiation, but you would not normally say that the method as a whole instantiated an object.

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/instantiate.html J:\mindprod\jgloss\instantiate.html
logofeedback Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email If you want your message kept confidential, not considered for posting, please explicitly specify that.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.213]
You are visitor number 55,490.