code wont enter into loop. thanks in advance for your help
im writing a password check program.
i want it to give "a valid password" if the rules are satisfied and "not a valid password" if they are not, along with the violated rules. but it wont enter into the first loop if i put for example "cmps200" which is a correct password it would type "not a valid password" any suggestions(if it helps the rules are length>6 and <15, at least a digit and at least a number and doesnt end with 99 after a sequence of alphabetical letters)
if(((len > 6) && (len < 15)) && ((charCount > 0)&& (intCount> 0)) && ((charCount > 0) &&((S.charAt(len-1)) != '9' && (S.charAt(len-2) != '9')))) //all rules satisfied
{
if ((charCount > 0) && (intCount> 0))
{
if ((charCount > 0) && ((S.charAt(len-1) != '9') && (S.charAt(len-2) != '9')))
{
System.out.println("a valid password");
}
}
}
else
{
System.out.println("not a valid password");
if ((len < 6) || (len > 15))
{
System.out.println("rule 1 violated");
}
i posted up to rule one.