The Javadoc for Scanner.nextInt() explains why quite nicely:
Scans the next token of the input as an int. This method will throw InputMismatchException if the next token cannot be translated into a valid int value as described below. If the translation is successful, the scanner advances past the input that matched.
Since the string value "Hello" can't be translated into an int, the Javadoc statement above applies.
[ March 21, 2008: Message edited by: Jelle Klap ]
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.