W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner myObj = new Scanner(System.in); System.out.println("输入姓名、年龄和工资:"); // 字符串输入 String name = myObj.nextLine(); // 数字输入 int age = myObj.nextInt(); double salary = myObj.nextDouble(); // 输出用户输入 System.out.println("姓名:" + name); System.out.println("年龄:" + age); System.out.println("工资:" + salary); } }