In java do we have any method to find that a particular string is part of string array. I can do in a loop which I would like to avoid.
e.g.
String [] array = {"AA","BB","CC" }; string x = "BB" I would like a
if (some condition to tell whether x is part of array) { do something } else { do something else }