As follows:
There is another sentence above:
Scanner in = new Scanner(System.in);
int a = in .nextInt();//Enter a number to assign to a.
Or String s = in.nextLine();//Enter a string of characters and give it to s.
You input things from the console and press Enter to end.
Int introduction:
The most commonly used in programs are the general integer type (referred to as "integer type" or "integer") and the long integer type (referred to as "long integer") , the type name of the integer type is "int", and the type name of the long integer type is "long int", which can be abbreviated as "long". Both int and long are keywords.
The int type occupies 4 bytes in memory, which is 32 bits. The int type is signed, so not all 32 bits are used to store data. The highest bit is used to store the sign. The highest bit is 0, which indicates that the data is a positive number. The highest bit is 1, which indicates that the data is a negative number. Use other 31 bits to store data.