does arraylist contain code example Example: list contains List arr = new ArrayList(4); boolean ans = arr.contains(2);