declaration and variable definition code example
Example 1: use declaration to define a variable
int x;
double y;
string someMeaningfulName;
Example 2: what is declaration of variable
declaration of variable just means defining that a variable of given data type is needed and hence compiler creates a memory block for such a variable based on its data type.
In Java, int n;