📜  java 获取输入 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:29.190000             🧑  作者: Mango

代码示例4
import java.util.*; //or java.util.scanner
Scanner doit = new Scanner(System.in);//Name the scanner
System.out.println("Username:");//It will specify username
String username = doit.next();//Use scanner and add .next for string .nextInt for int and follows