It looks like it's adding the name to a list of duplicates if the function
returns "false" when trying to add to the list of unique names..



On Mon, Oct 27, 2008 at 7:44 AM, <[EMAIL PROTECTED]> wrote:

>
> Can someone explain the following if statement?
>
> if (!uniques.add(name[i]))
>    dups.add(name[i]);
>
> I see what it is doing but am not too sure of why. I do not recall
> seeing this technique mentioned and it looks like a powerful tool.
>
> Thanks DenS
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to