How to read a String followed by an int in Java?
<p>I've been struggling to get this done. What I need is to read a input like this: <code>DEPOSITO 123 1000.00</code>, but the String "DEPOSITO" needs to be saved in one variable, the int "123" to another variable and the double "1000.00" to another variable. The problem is that I couldn't find anything like <code>scanner.nextString()</code>, if I could scan just the string into a variable, I probably could scan the rest of the input stream with <code>scanner.nextInt()</code> and <code>scanner.nextDouble()</code>. If I do <code>scanner.next()</code> on a attempt to read only the string, it reads the whole line, so what is the answer to my problem here? I'm really clueless.</p>