Object Oriented Software Engineering View all facts Glossary Help |
| subject > programming language construct > data item > variable > instance variable > Java instance variable |
| Java instance variable | ||||
| subject | fact | |||
| Java instance variable | is a subtopic of The Basics of Java | ![]() |
| is a kind of instance variable | ![]() | |
| is a kind of Java variable | ![]() | |
| should usually be declared private | ![]() | |
| Java variable | can be accessed by other variables and methods in any class in the same package by default | ![]() |
| can have an interface as its type which means that, with the variable, you can invoke any operation supported by the interface | ![]() | |
| is declared by giving the data type followed by the name of the variable | ![]() | |
| should be as private as possible | ![]() | |
| instance variable | implements an attribute or association | ![]() |
| 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 | ![]() |