10/11/2017 1:15:28 PM
Gaurav Nagar1 Answer
New Answer.nextLine() = reads a line of string including the spaces .next() = reads word SEPARATED with space ,it will not read any string after the space. input: hello world using .nextLine() will save hello world but using .next() will only save hello when you want to save hello world in .next() you need to input: hello <enter> world <enter>
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message