Scanner s = new Scanner(System.in);
System.out.println("请输入用户名:");
String username = s.next();
System.out.println("请输入密码:");
String password = s.next();
//判断用户名密码是否正确
if("a".equals(username) && "1".equals(password)){
System.out.println("登录成功");
}else{
System.out.println("登录失败");
}
}
慕田峪3281674
冰山点水
xiao梦
一条小咸鱼
相关分类