in java which of the following methods id used to check if an Arraylist contains an object code example
Example: list contains
List<Integer> arr = new ArrayList<Integer>(4);
boolean ans = arr.contains(2);
List<Integer> arr = new ArrayList<Integer>(4);
boolean ans = arr.contains(2);