Java has two overloads for String.toLowerCase and toUpperCase. One of the overloads accepts the Locale parameter as a parameter, while the other does not accept any parameters and uses the default locale ( Locale.getDefault()).
Options without parameters may not work as expected, because the case conversion takes into account internationalization, and the default locale is system-dependent. In particular, lowercase i is converted to uppercase, marked with a dot in Turkish.
What is the purpose of these methods? Do inconspicuous options have any legal possibilities? Or maybe it's just a design mistake? (Unlike several I / O APIs, which by default use the default encoding by default.)
source
share