[Solved] Why is it giving me the error “method ArrayList.add(String) is not applicable”?
Problem: ArrayList<String> means you want an array-backed list that can hold String objects. This restricts the add method to only accept strings. The mistake you are making is that you are passing other non-String objects into the add method. Bad Answer 1: The easy way out is to change it to ArrayList<Object>, but this defeats … Read more