I have an ArrayList containing names of instantiated objects that I want to execute the method 'count' on. I'm unsure if/how to do that, though. I have a loop to scan through the array list, and added pseudocode with what I'm trying to achieve.
n = 0;
while(n <= arrayList.size()){
(arrayList.get(n)).count();
}
I'm new to java and am not sure this is possible, but any help would be appreciated. Thanks.
n
.count()
, right? What did you mean by containing names of instantiated objects?