Read the API doc for the Scanner class to find a method that reads a String.
Java Platform SE 7
Type: Posts; User: Norm
Read the API doc for the Scanner class to find a method that reads a String.
Java Platform SE 7
Did you change the code to read the arithmetic operators as Strings and not as numbers?
if (unit = +) {
Two things wrong with the syntax here:
= is the assignment operator, == is for testing equality
+ is the addition operator. If you wanted a String, enclose it in "s like this: "+"...
Please copy the full text of the error messages and paste it here.
Please edit your post and wrap your code with
<YOUR CODE HERE>
to get highlighting and preserve formatting.