How can we compare a substring with the strings mentioned in an array using Java programming?
Eg. Check if "AC" is in { Apple - AC, Ball, Cat, Doctor........ ,}
This should return Apple - AC, as it contains AC as a substring.