By Herbert J. Bernstein
© Copyright 2003 Herbert J. Bernstein
Class Instance are the actual realization as objects
of classes or abstract data types that are the templates for the objects.
- Class
- An abstract data type defining both the states and the actions (the
variables and the methods -- components) that
an object must have in order to be an instance of that class.
- An object that is an instance of a given class may have additional
states and actions prescribed by the definitions of other classes of
which it is also an instance.
- Some languages (e.g. java) permit a class to act in whole or in
part as an instance of itself (static components)
- Instance Methods
- Methods defined in the class that will be instantiated in the
class instance objects.
- In java accessed by
object_name.method(arguments)
- Distinguished from class methods (static methods) accessed in java
by
class_name.method(arguments)
- Instance Variables
- Variables defined in the class that will be instantiated in the
class instance objects.
- In java accessed by
object_name.variable
- Shared by all the instance methods of the same object.
- Distinguished from class variables (static variables) accessed in
java by
class_name.variable. Class variables act as global common
storage.
Last Updated on 14 October 2003
By Herbert J. Bernstein
Email: yaya@bernstein-plus-sons.com