System.out.print("Enter something like 8 + 33 + 1,345 +137 : ");
I'm not sure if the int thing will recognize commas.
Type: Posts; User: javapenguin
System.out.print("Enter something like 8 + 33 + 1,345 +137 : ");
I'm not sure if the int thing will recognize commas.
The Scanner class can't add for you.
To take the values you have in a String and make them into numbers, you use the wrapper classes.
Integer.parseInt(String str);
Double.parseDouble(String...