how to check arraylist contains a string in java code example Example: java arraylist contains string boolean ans = arr.contains("geeks");