Given a string, bellow it shows the boolean condition to find Lowercase characters, Uppercase characters.
1 2 3 |
String password = "Password"; boolean hasUppercase = !password.equals(password.toLowerCase()); boolean hasLowercase = !password.equals(password.toUpperCase()); |