Newbie help with ArrayList!
Hello all
I have set up an ArrayList to store objects and I want to create a method to search through the ArrayList and return the number of times a single String object (specified in the method header parameter).
For example:
Array1:
Bill, Jim, Bill, Ted, Bill
Method returns: 3
The method would search through the array, see "Bill" 3 times and return the integer 1 indicating that "Bill" appears 3 times in the Array.
I am making sense? I'm clueless here. I know what I want to accomplish, but when it gets down to the coding i'm completely stumped!
As a starting point, I have...
public int countNames(String name)
Thanks :)