public class Variables /** This class demonstrates variables * */ { public static void main(String[] args) { // declare a variable // MUST specify data type of the variable, and then the identifier // which is the variable's name int x; // x is a variable of type integer // use assignment to put a value into a variable x = 2789543; // cannot put commas into an integer value 2,789,543 // 789=x; compiler error. must have a variable on left of assignment System.out.println("The value in x is: " + x); } }