Top "Java.util.scanner" questions

A simple text scanner in the JDK which can parse primitive types and strings using regular expressions.

Scanner issue when using nextLine after nextXXX

I am using the Scanner methods nextInt() and nextLine() for reading input. It looks like this: System.out.println("Enter …

java java.util.scanner
Read input line by line

How do I read input line by line in Java? I searched and so far I have this: import java.…

java java.util.scanner
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 …

java input output java.util.scanner
How to check the end of line using Scanner?

I have searched similar questions, but none helped. Consider a file : hi how are you? where were you? I want …

java java.util.scanner
Issues with nextLine();

Possible Duplicate: Scanner issue when using nextLine after nextInt I am trying create a program where it lets the user …

java java.util.scanner
Is it safe not to close a Java Scanner, provided I close the underlying readable?

If I have a method that takes a reader and I want to operate on the reader with a Scanner …

java java.util.scanner
Java Multiple Scanners

I have a class that creates multiple Integer objects and puts them into a LinkedList as shown below: public class …

java java.util.scanner
Scanner input validation in while loop

I've got to show Scanner inputs in a while loop: the user has to insert inputs until he writes "quit". …

java loops while-loop java.util.scanner
Integer.parseInt(scanner.nextLine()) vs scanner.nextInt()

My professor tends to do the following to get a number from the user: Scanner scanner = new Scanner(System.in); …

java performance integer java.util.scanner user-input
Eclipse character encoding

I am using Scanner to scan a .txt document in Java. However, when I open the .txt document in Eclipse, …

java eclipse character-encoding special-characters java.util.scanner