Never use == for String comparison but use the equals method instead. == checks for instance equality whereas the equals method actually checks the String contents.
This is the complete code that builds the Player objects.
Brett Freedman
Greenhorn
Joined: Feb 26, 2010
Posts: 13
posted
0
Rob Prime wrote:Never use == for String comparison but use the equals method instead. == checks for instance equality whereas the equals method actually checks the String contents.
Fixed. Thanks Rob! I've been going around and around with that bit of code all day.