private boolean checkPassword(String password) {
        boolean hasUppercase = !password.equals(password.toLowerCase());
        boolean hasLowercase = !password.equals(password.toUpperCase());
        boolean isAtLeast8   = password.length() >= 8;//Checks for at least 8 characters
        boolean hasDigit   = false;
        for(int i = 0; i < password.length(); i++) {
            if(Character.isDigit(password.charAt(i))) {
                hasDigit = true;
                break;
            }
        }
    return hasUppercase && hasLowercase && isAtLeast8 && hasDigit;
    }