Instantiation Encyclopedia Article

Instantiation

The following sections of this BookRags Literature Study Guide is offprint from Gale's For Students Series: Presenting Analysis, Context, and Criticism on Commonly Studied Works: Introduction, Author Biography, Plot Summary, Characters, Themes, Style, Historical Context, Critical Overview, Criticism and Critical Essays, Media Adaptations, Topics for Further Study, Compare & Contrast, What Do I Read Next?, For Further Study, and Sources.

(c)1998-2002; (c)2002 by Gale. Gale is an imprint of The Gale Group, Inc., a division of Thomson Learning, Inc. Gale and Design and Thomson Learning are trademarks used herein under license.

The following sections, if they exist, are offprint from Beacham's Encyclopedia of Popular Fiction: "Social Concerns", "Thematic Overview", "Techniques", "Literary Precedents", "Key Questions", "Related Titles", "Adaptations", "Related Web Sites". (c)1994-2005, by Walton Beacham.

The following sections, if they exist, are offprint from Beacham's Guide to Literature for Young Adults: "About the Author", "Overview", "Setting", "Literary Qualities", "Social Sensitivity", "Topics for Discussion", "Ideas for Reports and Papers". (c)1994-2005, by Walton Beacham.

All other sections in this Literature Study Guide are owned and copyrighted by BookRags, Inc.

Instantiation

Instantiation is the value or more specific variable (concrete code) that is generated using a template. Let's use a basic example of an addition expression a+b, wheras this expression is part of program. "a" and "b" are variables. An instantiation could be either of the following examples.

In example 1, "a" and "b" are are simply integers, they are specific values. In example 2, "a" and "b" represent the result of summation of column (A) and the summation of column (B). "sumCol(A)" and "sumCol(B)" are still variables, but they are more specific.

In object-oriented programming, instantiation is a more precisely defined version of some object which was already partially defined. An example of an object would be animals. To partially define animals, we name a specific class, dogs. A instance of dogs is Dalmatians. An instantiation would be Mary's Dalmatian, Rover. Rover is a specific Dalmatian that belongs to Mary.