Hi everyone,
I have a single string - let's call it string A.
I have an ArrayList of objects.
Each object contains three strings.
I want to iterate through the ArrayList of objects and check if any of the strings contained within the objects are the same as string A. Furthermore, I only want to compare the third string in each object with string A.
Basically, I am having problems with the syntax for a string contained in an object, and any help would be great.
Here's the part of code I'm having trouble with:
while( iterator.hasNext() )
{
if( iterator.string3.equals( stringA ) )
{
}
}
If anyone could help me with this approach, or give me any ideas for a different approach, that would be a big help.
Thanks!