Replace next()
with nextLine()
:
String productDescription = input.nextLine();
More Related Contents:
- Java String Scanner input does not wait for info, moves directly to next statement. How to wait for info? [duplicate]
- Extract Integer Part in String
- Java Scanner class reading strings
- Replace a character specific number of times in String Java
- Java; Initializing A Count of Input, After Period Is Entered
- java.util.NoSuchElementException: No line found
- How to parse a mathematical expression given as a string and return a number? [duplicate]
- Regex to match a C-style multiline comment
- Difference between String replace() and replaceAll()
- Splitting a string at every n-th character
- Convert float to String and String to float in Java
- How to split a string in Java
- Why is the String class declared final in Java?
- Java – Best way to grab ALL Strings between two Strings? (regex?)
- Fast algorithm for searching for substrings in a string
- Java change áéőűú to aeouu [duplicate]
- Extracting pairs of words using String.split()
- XML Document to String
- String replace a Backslash
- Use of the String(String) constructor in Java [duplicate]
- How to convert a String to CharSequence?
- How to add text to an image in java?
- Is Java’s assertEquals method reliable?
- How to convert String object to Boolean Object?
- Sort a single String in Java
- Java string intern and literal
- Java split String performances
- Find all words with 3 letters with regex
- Using DocumentFilter.FilterBypass
- split string only on first instance – java