Yes that should do it. Remember to be careful to not run off the end of the list.
Type: Posts; User: Norm
Yes that should do it. Remember to be careful to not run off the end of the list.
Don't use hardcoded numbers.
In my last post where should the second index start when the first index is moved to the next item? What is the relationship between where the first index is set to...
To see how to control the indexes, take a piece of paper and draw a horizontal row of numbers to represent items in an array. Point one index to the first item and the second index to the next item....
A List should should work.
Use an array or arraylist to hold the objects.
Use a nested loop to compare each object in the array/arraylist against the rest of the objects in the array/arraylist.