Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


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

Have you ever encountered a surprise while using toLowerCase()? This is a widely used method when it comes to strings and case conversion. There is a nice little thing you should be aware of. toLowerCase() respects internationalization (i18n). It performs the case conversion with respect to your Locale. When you call toLowerCase(), internally toLowerCase(Locale.getDefault()) is getting called. It is locale sensitive and you should not write a logic around it interpreting locale independently.import java.util.Locale; public class ToLocaleTest {  ...

2,721 0       JAVA TOLOWERCASER() LOCALE SPECIFIC STRA