Object Oriented Software Engineering   View all facts   Glossary   Help
subject > programming language construct > data item > variable > instance variable > Java instance variable
Upinstance variable, Java variable

Java instance variable
subjectfact 
Java instance variableis a subtopic of The Basics of Java2001-08-30 14:56:15.0
is a kind of instance variable2001-08-30 14:56:15.0
is a kind of Java variable2001-08-30 14:56:15.0
should usually be declared private2001-08-30 14:56:15.0
Java variablecan be accessed by other variables and methods in any class in the same package by default2001-08-30 14:56:22.0
can have an interface as its type which means that, with the variable, you can invoke any operation supported by the interface2001-08-30 14:56:22.0
is declared by giving the data type followed by the name of the variable2001-08-30 14:56:22.0
should be as private as possible2001-08-30 14:56:22.0
instance variableimplements an attribute or association2001-08-30 14:56:00.0
should be as private as reasonably possible - almost never make them public2001-08-30 14:56:00.0
variablecan contain different classes of objects depending on the type of the variable2001-08-30 14:58:18.0
can refer to a particular object, several different objects during the execution of a program, or no object at all2001-08-30 14:58:18.0
has scope2001-08-30 14:58:18.0
has type2001-08-30 14:58:19.0