If you read the Exception messages, it's an InputMismatchException. This is highly likely caused by the nextDouble() or nextInt() function, when it's not reading the correct type. Make sure your data is aligned correctly, and you're not reading doubles with readInt().