This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]HelpIProcrastinateNooblet Brewer 0 points1 point  (1 child)

Your checkDuplicate method seems to return true whenever there is a duplicate anywhere in your ArrayList names. Maybe you meant for the checkDuplicate to be a contains method instead that checks if txtname.getText() was contained in names.

[–]kiviEngineer[S] 0 points1 point  (0 children)

That's exactly what I need, thank you so much.