Try this:
in.nextLine();
This advances the Scanner to the next line.
More Related Contents:
- How do I read / convert an InputStream into a String in Java?
- How to append text to an existing file in Java?
- How do I create a Java string from the contents of a file?
- How to read all files in a folder from Java?
- How to read integer value from the standard input in Java
- Do I need to close() both FileReader and BufferedReader?
- byte[] to file in Java
- Create a new line in Java’s FileWriter
- Get an OutputStream into a String
- FileInputStream vs FileReader
- How to write data to two java.io.OutputStream objects at once?
- Java: Difference between PrintStream and PrintWriter
- Getting “java.nio.file.AccessDeniedException” when trying to write to a folder
- java IO to copy one File to another
- java read file from network device
- Sending the same but modifed object over ObjectOutputStream
- console.writeline and System.out.println
- Most efficient way to create InputStream from OutputStream
- read complete file without using loop in java
- Java Scanner doesn’t wait for user input [duplicate]
- Exception: Unexpected end of ZLIB input stream
- In Java, what is the default location for newly created files?
- Given a Java InputStream, how can I determine the current offset in the stream?
- Reading file chunk by chunk
- Resetting Standard output Stream
- Why does FileChannel.map take up to Integer.MAX_VALUE of data?
- How to read UTF8 encoded file using RandomAccessFile?
- ObjectInputStream(socket.getInputStream()); does not work
- Test if a file is an image file
- Read and Write Text in ANSI format