rendered paste bodypublic class validatingPassword{
public static void main(String[] args)
{
boolean password= isSecurePassword("testcase");
System.out.println(password);
}
public static boolean isSecurePassword(String password)
{
int lengthPassword= password.length();
if (lengthPassword < 10);{
return false;
}
boolean capital = false;
boolean lowerCase = false;
boolean digit = false;
//default is set to false
for (int x = 0; x < lengthPassword; x++)
{
char tested= password.charAt(x);
if ('A' <=tested && tested <= 'Z');{
capital = true;
//no idea why brackets are so fickle
}
if ('a' <=tested && tested <= 'z'); {
lowerCase = true;
}
if ('0' <=tested && tested <= '9');{
digit = true;
}
return capital && lowerCase && digit;
}
else
if (capital = false || lowerCase = false || digit = false){
return false;
}
}}