How to Check if an ArrayList Contain 2 values?

Viewed 23335

is there any way to check if a collection contain a value or more with better performance than looping twice with contains?

in other meaning something that would look like this

person.contains("Joe" || "Jasha");
6 Answers
Related