Variables in Java: Didal, Dianne S. BSCS 3-Ipil Campus
Variables in Java: Didal, Dianne S. BSCS 3-Ipil Campus
Didal, Dianne S.
BSCS 3- Ipil Campus
Wh
at i
Var s a
ia b
le?
A variable is a named memory location that holds
the data value of a particular data type. A variable
in Java is a kind of container that contains the
value during program execution.
double payRate ;
class ClassName{
static <DataType> <variable_name>;
}
Example:
class MyClass{
static int number; //number is a static variable
}
1-3.) What are the 3 types of variables?