Is there any better way to avoid multiple OR statements in if condition?
I have if with more than 8 strings in OR statements.
if(type.equalsIgnoreCase(anotherString1) ||
type.equalsIgnoreCase(anotherString2) ||
type.equalsIgnoreCase(anotherString3)){
return true;
}
Looking for better approach to write if with multiple OR statements or how to avoid