---Restoring content starts---
The scanner mechanism is required for input
Code:
Enable scanner mechanism
Scanner input = new Scanner(System.in);
//String x= input.next();
//String x = input.nextLine();
//int num = input.nextInt();
//double num = input.nextDouble();
Use the out method that requires System
Code:
System.out.println();
The content to be output in brackets. . .
System.out.println("string");
System.out.println(variable);
System.out.println("string"+num);
The above example code of JAVA basic console input and output is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.