What are different ways of creating variable in Java.
There are 3 different ways of creating variables in Java.
Declare variable in one line and Define in another
DataType VariableName;
VariableName = Value;
Declare and Define variable in the same line
DataType VariableName = Value;
For declaring multiple Variables;
DataType VariableName1, DataType VariableName2, DataType VariableName3;
VariableName1 =value1;
VariableName2= value2;
VariableName3 = value3