java check if any item from string array is in arraylist code example Example: java arraylist contains string boolean ans = arr.contains("geeks");