📜  如何在java代码示例中输入

📅  最后修改于: 2022-03-11 14:52:25.963000             🧑  作者: 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