Monday, May 10, 2010

Java’s toLowerCase() has got a surprise for you!

We generally use toLowerCase() on strings and write logic to perform some operations. But String.toLowerCase() has a catch. This method is Locale-specific.

If you do not need internationalization, to make it safer, you may use another method toLowerCase(Locale.English) and override the locale to English always.

Read this article on javapapers.com for complete details.

No comments:

Post a Comment