这段代码应该检查密码长度是否合适,但如果密码长度大于或等于 16,它会跳过 if 条件并且不打印句子。
/* This bit of the coe just checks the length of the password */
if (Password.length() >= 8) {
if (Password.length() <= 10) {
System.out.println("Medium length of password");
}
}
else if (Password.length() < 8) {
System.out.println("Bruv youre asking to be hacked");
}
else if (i >= 10) {
if (Password.length() <= 13) {
System.out.println("Good password length");
}
/* The part that fails */
else if (Password.length() >= 16) {
System.out.println("Great password length");
}
}
如果密码长度大于或等于 16,则代码应输出“Great password length”,但如果密码长度大于或等于 16,则不会输出任何内容
汪汪一只猫
婷婷同学_
相关分类