We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e41dfd3 commit dda76ecCopy full SHA for dda76ec
1 file changed
Password Strength Checker.java
@@ -0,0 +1,15 @@
1
+import java.util.regex.*;
2
+
3
+public class PasswordChecker {
4
+ public static void main(String[] args) {
5
+ String pass = "Abcd1234@";
6
7
+ boolean strong = pass.length() >= 8 &&
8
+ pass.matches(".*[A-Z].*") &&
9
+ pass.matches(".*[a-z].*") &&
10
+ pass.matches(".*\\d.*") &&
11
+ pass.matches(".*[@#$%].*");
12
13
+ System.out.println(strong ? "Strong Password" : "Weak Password");
14
+ }
15
+}
0 commit comments