Java   View all facts   Glossary   Help
syntactic unit > access unit > variable
Next access unitclass    Upaccess unit    Previous access unitmethod   

variable
subjectfact 
variablecan be accessed by other variables and methods in any class in the same package by default    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:38:12.0
can contain different classes of objects depending on the type of the variablesource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:38:12.0
can contain only values that are of the same type as the variable or a subtype of the variable's typeadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:38:12.0
can have an interface as its type which means that, with the variable, you can invoke any operation supported by the interface    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:38:12.0
can refer to a particular object, several different objects during the execution of a program, or no object at all    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:38:13.0
has definition An item of data named by an identifieradded by: JK, source: Sun Java Tutorial, reference: Glossary, 2001-10-19 11:38:13.0
has 1 value at any one time which is the that it refers toadded by: DS, source: Sun Java Tutorial, 2001-10-19 11:38:13.0
has 1 nameadded by: DS, source: Sun Java Tutorial, 2001-10-19 11:38:13.0
has scope which is the block in which it is declaredadded by: DS, source: Sun Java Tutorial, 2001-10-19 11:38:13.0
has type    added by: DS, source: Sun Java Tutorial, 2001-10-19 11:38:13.0
has lifetime which is the time its block is being executedadded by: DS, 2001-10-19 11:38:13.0
has purpose to refer to an object or a class or a primitive datumadded by: DS, 2001-10-19 11:38:13.0
has scopesource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:38:13.0
has part value2001-10-19 11:38:13.0
is a subtopic of Variables and Data Types2001-10-19 11:38:13.0
is declared by giving the data type followed by the name of the variable    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:38:13.0
is destroyed in the block where it is declaredadded by: DS, 2001-10-19 11:38:13.0
is partitioned into member variable, local variable, formal parameteradded by: DS, source: Sun Java Tutorial, 2001-10-19 11:38:13.0
is a kind of access unitadded by: DS, 2001-10-19 11:38:13.0
may have access modifier added by: JK, source: Teach Yourself Java 2 in 21 Days, 2001-10-19 11:38:13.0
refers to a class or an object or a primitive datumadded by: DS, 2001-10-19 11:38:13.0
should be as private as possiblesource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:38:13.0
should have comment if it is non-obvioussource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:38:13.0
access unithas access mode2001-10-19 11:35:59.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0

Kinds of variable :

Next access unitclass    Upaccess unit    Previous access unitmethod