all of the variables above have the warning in the title. Could you please tell me why that is happening?
public class DataTypes {
public static void main(St
You have defined the variables: x
, y
, ssn
, phone
, num
and twoLine
.
But you never use the variables anywhere in the code.
For instance, if you print the variables out:
System.out.println(x + y + ssn + phone + num + twoLine);
All the warnings should disappear
The variables you declared are never used, only assigned to, therefore you're being warned.