I want to check if the variable foo is equal to a list of values in java
if( foo == "Cheese" || foo == "a" || foo == "3" ) {
// ...
}
I want to know how to do something like the following :
String[] values = {"Cheese", "a", "3"};
if( foo in values ) {
// ...
}
Thank you for helping me !