5.3 Flashcards
Identifer
Name given for variable
Primitive
Primitive types are the most basic data types available within the Java language
There are 8: boolean, byte, char, short, int, long, float and double..
Primitive
Primitive types are the most basic data types available within the Java language
There are 8: boolean, byte, char, short, int, long, float and double..
Variable , instance variables
*
A variable provides us with named storage location for a value that a program can manipulate.
Instance variables are non-static variables and are declared
in a class outside any method, constructor or block.
So each object has a
Local variable
A variable defined within a block or method or constructor is called local variable.
Static variable
static variable belongs to the class instead of a specific instance. This means that all instance objects of the class share the same value and if that value is altered, it is altered for all the instance objects.