The difference between next() and nextLine()
nextLine() will store the complete sentence inputted in the String variable whereas next() will only save the first word inputted and the rest will go in an input buffer.
If you use a next() then a next(),
import java.util.Scanner;
public class test1...
journey-to-mastery.hashnode.dev2 min read