what is variable?
variable is container for storing data values.
It is a name of memory location.
variable name should be start with small letter.
$,_ can be used.
Numeric are not allowed in beginning.
Memory storage of primitive data type is known as stack.
example:For variable assign.
int a=20;
here,int is a data type.
a is a variable name.
= is a assignment operator.
20 is a value and
; is a end of the statement.
example:variable declaration.
static short i;
Top comments (0)