Java View all facts Glossary Help |
syntactic unit > access unit > variable |
variable comparison table |
Subject | be accessible to | declare anywhere in | have | pass by | be a member of | have lifetime | initialize by | refer directly to | is a synonym of | is a subtopic of | have name | have purpose | reference without | declare you | refer indirectly to | use | have the same name as | has definition | is partitioned into | inherit by | use by | contain |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
constant | comment if it is non-obvious | longer than the existence of an instance of the class | final variable | Constants | a constant name | to refer to an object or a class or a primitive datum | the existence of an instance of a class | use the 'final' keyword | A variable with a value that never changes | only values that are of the same type as the variable or a subtype of the variable's type | ||||||||||||
local variable | a method | a lifetime which is the time of one execution of its block | an assignment statement | Variables and Data Types | to refer to an object or a class or a primitive datum | A variable that is declared in a method | only values that are of the same type as the variable or a subtype of the variable's type | |||||||||||||||
member variable | the code in its class | a class outside of a method | comment if it is non-obvious | a class or an object | an assignment statement | field | to refer to an object or a class or a primitive datum | class variable, instance variable | only values that are of the same type as the variable or a subtype of the variable's type | |||||||||||||
operand | comment if it is non-obvious | argument of an operator | Operators | to refer to an object or a class or a primitive datum | An input to an operator | only values that are of the same type as the variable or a subtype of the variable's type | ||||||||||||||||
parameter | comment if it is non-obvious | value | calling the method or constructor or exception handler | formal parameter | Variables and Data Types | to transmit a primitive datum or object reference to a method or constructor | a member variable | A variable that transmits a primitive datum or object reference to a method or constructor | only values that are of the same type as the variable or a subtype of the variable's type | |||||||||||||
pointer | comment if it is non-obvious | Variables and Data Types | to refer to an object or a class or a primitive datum | A variable that is used to store an address | only values that are of the same type as the variable or a subtype of the variable's type | |||||||||||||||||
private variable | comment if it is non-obvious | to refer to an object or a class or a primitive datum | A variable declared with the private access modifier | subclasses | only values that are of the same type as the variable or a subtype of the variable's type | |||||||||||||||||
public variable | comment if it is non-obvious | to refer to an object or a class or a primitive datum | A variable declared with the public access modifier | subclasses | only values that are of the same type as the variable or a subtype of the variable's type | |||||||||||||||||
variable declared as a non-primitive data type | comment if it is non-obvious | Variables and Data Types | to refer to an object or a class or a primitive datum | its value which is an object | the name of a class as its type | calling methods or accessing the object's instance variables | an instance of a class | |||||||||||||||
variable declared as primitive data type | comment if it is non-obvious | its value | Variables and Data Types | to refer to an object or a class or a primitive datum | object in the sense that its contents is not an instance of any class | |||||||||||||||||
variable with no access modifier | default access mode | Variables and Data Types | to refer to an object or a class or a primitive datum | only values that are of the same type as the variable or a subtype of the variable's type |
Next access unit: class Up: access unit Previous access unit: method