62,614
社区成员
发帖
与我相关
我的任务
分享
public class Talker {
public static void main(String[] args) {
Console c = System.console();
String u = c.readLine("%s", "username:");
System.out.println("hello "+u);
char[] pw;
if(c!=null && (pw = c.readPassword("%s", "password:"))!= null){
System.out.println("exe");
}
}
}
Console c = System.console();
if(c!=null){
String u = c.readLine("%s", "username:");
System.out.println("hello "+u);
char[] pw;
if(c!=null && (pw = c.readPassword("%s", "password:"))!= null){
System.out.println("exe");
}
}