Java   View all facts   Glossary   Help
member > instance member > instance variable
Next instance memberinstance method    Upinstance member, member variable

instance variable comparison table
Subject refer to be accessible to declare anywhere in declare by make have be a member of be initialize by is a kind of is a synonym of is a subtopic of implement have syntax rule have purpose place in destroy in access by have access modifier define by be part of has part has definition is partitioned into maintain refer you contain
instance member         member Members           instance method, instance variable   
member variablea class or an object or a primitive datumthe code in its classa class outside of a methodgiving the data type followed by the name of the variable comment if it is non-obviousa class or an objectas private as possiblean assignment statementvariablefield  
bold = mandatory
italic = non-terminal
normal font = optional
to refer to an object or a class or a primitive datum the block where it is declaredother variables and methods in any class in the same package by default  value class variable, instance variable  only values that are of the same type as the variable or a subtype of the variable's type
instance variablean object or a primitivethe code in its classa class outside of a methodgiving the data type followed by the name of the variableprivate to prevent direct access to instance variable - accessor methods should be used instead to protect data abstractioncomment if it is non-obviousa class or an objectas private as reasonably possible - almost never make an instance variable publican assignment statementmember variableobject variableMembersan attribute or an association
bold = mandatory
italic = non-terminal
normal font = optional
to refer to an object or a class or a primitive datuma class such that there is no needless duplication of it, and such that it is useful in all the subclasses of the class in which it is definedthe block where it is declaredall methods of its classan instance variable definitionan objectvalueAny item of data that is associated with a particular object. part of its object's statejoin the name of the variable with a dot to the instance variable name.
Example:
variableName.instanceVariableName
only values that are of the same type as the variable or a subtype of the variable's type

Next instance memberinstance method    Upinstance member, member variable