You can try reader.ReadLine()
to read the full line of user input and do what you want later in the code. For example put all chars into an array.
Scanner reader = new Scanner(System.in);
String input = reader.ReadLine();
char[] c = input.toCharArray();
More Related Contents:
- AWS Lambda: Task timed out
- Simple conversion between java.util.Date and XMLGregorianCalendar
- Why “no projects found to import”?
- How to change Java version for Maven in IntelliJ?
- DAO and Service layers (JPA/Hibernate + Spring) [duplicate]
- What is binary compatibility in Java?
- How to configure log4j to only keep log files for the last seven days?
- Run Handler messages in a background thread
- JavaFX Alerts and their size
- Using @Context, @Provider and ContextResolver in JAX-RS
- javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary
- What does the javac debugging information option -g:vars do?
- How to customise Jackson in Spring Boot 1.4
- Create a SortedMap in Java with a custom Comparator
- Java-get most common element in a list
- What are the negative aspects of Java class Stack inheriting from Vector?
- Using Keys with JGit to Access a Git Repository Securely
- Can SHA-1 algorithm be computed on a stream? With low memory footprint?
- Java charAt used with characters that have two code units
- Regarding thread safety of servlet [duplicate]
- Java: Timezone why different timezone give same value in millisec
- Creating .p12 truststore with openssl
- Let ActionListener listen for change in JTextField instead of only enter?
- Classes that don’t inherit Object class
- How to read an XML file with Java?
- maximum size of java class / exception table
- Jboss Seam: Enabling Debug page on WebLogic 10.3.2 (11g)
- What’s the fastest way to read from System.in in Java?
- Best way to get maximum Date value in java?
- Compare two arrays of primitives in Java?