World!\");\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter your name: \");\n String name = scanner.nextLine();\n System.out
The nextShort, nextFloat, and nextLong methods in Scanner work similarly. Each of these methods (except nextLine) reads a set of consecutive characters until whitespace (such as a blank or a tab) encountered. The nextLine method reads all of the data that a user typed on a line before pres...