private static boolean lengthTest(String password) {
return (password.length() >= 6 && password.length() <= 12);
}
private static boolean onlyLettersAndDigitsTest(String password) {
char[] passwordArray = password.toCharArray();
for (char currentCharacter : passwordArray) {
if (!Character.isLetterOrDigit(currentCharacter)) {
// code omitted
}
}
}
a) return (password.length() >= 6 && password.length() <= 12);
b) return (password.length() >= 6 && password.length() <= 12);
c) return (password.length() >= 6 && password.length() <= 12);
d) return (password.length() >= 6 && password.length() <= 12);