public boolean isPasswordCorrect(String pwd) {
int num = 0;
num = Pattern.compile("\\d").matcher(pwd).find() ? num + 1 : num;
num = Pattern.compile("[a-zA-Z]").matcher(pwd).find() ? num + 1 : num;
num = Pattern.compile("[-.!@#$%^&*()+?><]").matcher(pwd).find() ? num + 1
: num;
if (num >= 2) {
return true;
}
return false;
}