Eight basic data types and string types
package TX; import java.util.Scanner; public class Input { public static void main(String[] args) { Scanner input = new Scanner(System.in); //Seven basic data types int i = input.nextInt(); byte b = input.nextByte(); Double d = input.nextDouble(); Float f = input.nextFloat(); short s = input.nextShort(); long l = input.nextLong(); boolean bo = input.nextBoolean(); // string type String string = input.nextLine(); //The acquisition of the character type cannot be obtained directly, but is obtained through a string String chString = input.nextLine(); char ch = chString.charAt(0); } }