In Java , int a = System.in.read(); this sentence reads a character, and then returns the ASCII of the corresponding character.
For example, if the console input 123 only reads one character 1, and the corresponding ASCII is 49, then output 49, input abc, read a, and the corresponding ASCII is 97, then output 97;
Scanner sc = new Scanner(System.in)
int n = sc.nextInt(); read a number from the console.
String c = sc.next();//Read string from console
The above is the full content of Java in Java about how to read numbers or strings on the console. I hope it will be helpful to everyone and support Wulin.com more~