Variable, Constant & Literals in JAVA

A variable is a data name that is used for storing a data value. The value of the variable may be changed during the program execution, Example: – int number = 8; Here ‘int’ is a data type, ‘number’ is a variable name and 8 is a value that it stores.