ArrayList<String> listName = new ArrayList<>(); int occurrences = Collections.frequency(listName, "element");