资源介绍
public class JJL2 {
public static void main(String[] args) {
System.out.println(new JJL2().checkPassword("123sdhgh*/-/*"));
}
private boolean checkPassword(String password) {
int numberCount = 0;
int letterCount = 0;
int otherCount = 0;
for (int i = 0; i < password.length(); i++) {
char temp = password.charAt(i);
if (temp >= 48 && temp <= 57) {
numberCount++;
}else if((temp >= 65 && temp <= 90) || (temp >= 97 && temp <= 122)){
letterCount++;
}else{
otherCount++;
}
if (numberCount > 0 && letterCount > 0 && otherCount > 0) {
return true;
}
}
return false;
}
}
- 上一篇: Turbo Pascal For Win 1.5
- 下一篇: PASCAL精要.chm