![]() |
subject > programming language construct > data item > variable > instance variable > Java instance variable |
![]() ![]() | ||||||||||
Java instance variable comparison table |
Subject | implement | has definition | have | be | access by | declare by | is a subtopic of | is a synonym of | is a kind of | declared |
---|---|---|---|---|---|---|---|---|---|---|
instance variable | an attribute or association | A data item present in all the instances of a class, normally used to implement associations and attributes | comment if it is non-obvious | as private as reasonably possible - almost never make them public | 2.3 - Instance Variables | field | variable | |||
Java variable | an interface as its type which means that, with the variable, you can invoke any operation supported by the interface | as private as possible | other variables and methods in any class in the same package by default | giving the data type followed by the name of the variable | The Basics of Java | variable | ||||
Java instance variable | an attribute or association | an interface as its type which means that, with the variable, you can invoke any operation supported by the interface | as private as reasonably possible - almost never make them public | other variables and methods in any class in the same package by default | giving the data type followed by the name of the variable | The Basics of Java | Java variable | private |