Category "java.util.scanner"

Scanner is skipping nextLine() after using next() or nextFoo()?

I am using the Scanner methods nextInt() and nextLine() for reading input. It looks like this: System.out.println("Enter numerical value"); int option; o

How to make multiple Scanners with the same input line?

I'm making a terminal game that uses Scanner objects. Up to now, I've had no problems with the way I did things. But now, I want to add "cheat-codes", for that

how to print out the user number input with the result instead of showing only result?

I am trying to print out the numbers that user input but i got no idea (example: when user input 2 and 3, it should be show 2+3=5 instead of 5 alone ) also how

Scanning multiple lines using single scanner object

I a newbie to java so please don't rate down if this sounds absolute dumb to you ok how do I enter this using a single scanner object 5 hello how do y