Today I'm going to show you how to declare a variable in Java. Following format is the common way to declare a variable in Java,
(Data Type)(Space)(Variable Name);
int x;
Here "int" is the datatype (I will show you what are the datatype in Java in my upcoming posts) and the "x" is the variable name.
No comments:
Post a Comment