Originally posted by Rose Evans:
You mean this line? choice = EasyIn.getInt(); If I uncomment this line..I get this error...
F:\VendingMachine.java:26: cannot resolve symbol
symbol : variable EasyIn
location: class VendingMachine
choice = EasyIn.getInt();
That is because you never declared the variable anywhere... Can't really help you as we can't tell what this variable is supposed to be anyway. But as a guess, it could be a class that reads from the console and returns an int.
As as side note, this question is similar to the way I put together christmas presents. Can't figure out a part, so I just don't use it... and later wonder why the toy isn't working properly...
at the beginning or end of the while loop in your original code, you would immediately have seen for yourself that it doesn't change. In my opinion, such "debugging output" is very helpful in tracking down problems.