Sunday, August 30, 2015

How To Declare A Variable In Java

Hi All...!

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);


For a example,

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