I have a problem with this method. It seems to me that whenever I try to use it with some String, I get false
for the value of a, even though the String contains those three characters. Can anyone tell me what's wrong here?
public static boolean VerSeTemLetras (String qqString){
boolean a;
int tem_a;
int tem_b;
int tem_c;
if (qqString.contains("a")) {
tem_a = 1;
} else {
tem_a = 0;
}
if (qqString.contains("b")) {
tem_b = 1;
} else {
tem_b = 0;
}
if (qqString.contains("c")) {
tem_c = 1;
} else {
tem_c = 0;
}
a = ((tem_a + tem_b + tem_c) > 2 );
return a;
}