|
|
|
|
A class is a template from which to make an object An instance of a class is an object. (This is somewhat loose terminology, but the two terms are usually considered synonyms.)
For example, given a class like this:
we can instantiate an instance of this class as follows: BankAccount ac = new BankAccount(); The actual instantiation is performed in: new BankAccount(); while: BankAccount ac; is just a reference to the instance. The instance is created in two stages:
Note: More about constructor methods very soon... |
|
This page was last modified on 02 October, 2007 |