input - While loop and if statement trouble -
when put in account number in terminal window error
the data put correct, put string such as"ste251" accountand int such 500 balance.
also when try stop loop when throws mismatch exeption get:
java.util.inputmismatchexception: null (in java.util.scanner) java.util.inputmismatchexception @ java.util.scanner.throwfor(scanner.java:909) @ java.util.scanner.next(scanner.java:1530) @ java.util.scanner.nextint(scanner.java:2160) @ java.util.scanner.nextint(scanner.java:2119) @ writeaccountbalances.writetofile(writeaccountbalances.java:58)
from the docs inputmismatchexception:
thrown scanner indicate token retrieved not match pattern expected type, or token out of range expected type.
that pretty says needs said. check unexpected input.
Comments
Post a Comment