We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e91fcbb commit e76f59bCopy full SHA for e76f59b
1 file changed
PasswordStrength.java
@@ -0,0 +1,11 @@
1
+class PasswordStrength {
2
+ public static void main(String[] args) {
3
+ String p = "Java@123";
4
+ boolean strong = p.length()>=8 &&
5
+ p.matches(".*[A-Z].*") &&
6
+ p.matches(".*[a-z].*") &&
7
+ p.matches(".*\\d.*") &&
8
+ p.matches(".*[@#$%!].*");
9
+ System.out.println(strong ? "Strong Password" : "Weak Password");
10
+ }
11
+}
0 commit comments