To declare multiple variables in Java, separate them with comma:
int a, b, c
.You can either declare them without assigning initial values:
int a, b, c;
Or, optionally, assign some initial values to them:
int a = 1, b = 2, c;
int a, b, c
.You can either declare them without assigning initial values:
int a, b, c;
Or, optionally, assign some initial values to them:
int a = 1, b = 2, c;