Object Oriented Software Engineering View all facts Glossary Help |
| subject > programming language construct > data item > variable > instance variable |
| instance variable (data member, field) | ||||
| subject | fact | |||
| instance variable | is a synonym of data member | ![]() |
| is a synonym of field | ![]() | |
| has definition A data item present in all the instances of a class, normally used to implement associations and attributes | ![]() | |
| implements an attribute or association | ![]() | |
| is a subtopic of 2.3 - Instance Variables | ![]() | |
| is a kind of variable | ![]() | |
| should be as private as reasonably possible - almost never make them public | ![]() | |
| variable | can contain different classes of objects depending on the type of the variable | ![]() |
| can refer to a particular object, several different objects during the execution of a program, or no object at all | ![]() | |
| has scope | ![]() | |
| has type | ![]() | |
| should have comment if it is non-obvious | ![]() |
Kinds of instance variable :