Supplement

The shortcut character sout will directly call out the java output command
Scanner input = new Scanner(System.in);
Scanner is a class Scanner. The most practical aspect of this class is that the console input
input is only the object name, you can change it to any Non-java reserved, such as a, b, c are all OK
new is a space for the object new (open up) to store the scanned things
System.in is an instance of PrintStream (byte print stream), can only be read by byte
Scanner-is a basic class of the java class library, a simple text scanner that can use regular expressions to parse basic types and strings.
input-the declared variable name.
new Scanner()-allocate space for variable input, initialize and instantiate.
System.in-parameter, here is the meaning of getting the input stream.

Guess you like

Origin blog.csdn.net/Yoona_1/article/details/112762394