We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 856509a + 8d38663 commit f3f4cb3Copy full SHA for f3f4cb3
passwd_strength/PasswordStrength.java
@@ -12,26 +12,17 @@ public static void main(final String ar[]) {
12
char x = password.charAt(i);
13
if (Character.isLetter(x)) {
14
if (Character.isUpperCase(x)) {
15
-
16
hasUpperCase = true;
17
18
} else if (Character.isLowerCase(x)) {
19
20
hasLowerCase = true;
21
}
22
23
hasLetter = true;
24
} else if (Character.isDigit(x)) {
25
26
hasDigit = true;
27
28
29
- // no need to check further, break the loop
30
- if (hasLetter && hasDigit && hasUpperCase && hasLowerCase) {
31
+ if (hasLetter && hasDigit && hasUpperCase && hasLowerCase) {
32
break;
33
34
35
36
if (hasLetter && hasDigit && hasUpperCase && hasLowerCase) {
37
System.out.println("STRONG");
0 commit comments