Sometimes my brain just does not function..

I got it now... the add method returns true or false; with false (not
false) triggering the if statement adding the name to dups.

Have a great day!

DenS



On Oct 27, 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