If you have to check if str
is equal to a string in strarray
so you have to cycle it.
for(int i = 0; i<strarray.length; i++){
if(str.equals(strarray[i])){
System.out.println(strarray[i]+" help me");
}
}
2
solved How can i check string value in String array?