Arraylist.contains function code example
Example 1: java arraylist contains string
boolean ans = arr.contains("geeks");
Example 2: arraylist contains doc
ArrayList<String> strings=new ArrayList<String>();
boolean ans = arr.contains("geeks"); //ans=false