refrence on a list and find if a given string is in the list java code example Example: list contains List arr = new ArrayList(4); boolean ans = arr.contains(2);