How to create scanner for string?
next() if you want to use a delimiter nextLine() if you want input until end of line (line break \n)
But always remember that if we take a String input after an integer input, the String input is just skipped and moves to the next input. So to avoid this we have to again define the nextLine() function. But in BufferedReader there is no such problem.