This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
According to the API documentation, the equals method for Locale returns true if language, country, and variant are all identical. If you're getting unexpected results, it might be because of an unexpected variant.
You could try adding println statements to verify what you're working with -- calling getCountry(), getLanguage(), and getVariant() on both Locale instances.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Joined: May 10, 2006
Thanks for the welcome.
I did use print statements to see if i was getting the right language and country and variant.
getCountry()and getLanguage() return the 2 digit strings en, gb but the getVariant() returns an empty string.