public String verify(String param){
String verify = new String(DEFAULT_PARAM);
if(param != verify){
throw new Exception("is not the same");
}
else{
System.out.printf("passed")
}
}
i need to verify 2 string. when good password print passed but exception is throw even when password is good.
i tried to change my DEFAULT_PARAM, without any luck.
>Solution :
you dont need new string, just verify with DEFAULT_PARAM.