Check out example codes for "how to take multiple string input in java using scanner". It will help you in understanding the concepts better.

Code Example 1

public String nextLine()

Learn ReactJs, React Native from akashmittal.com