I am using the android 4.2 SDK SDK, I get a warning in this line of code:
String text0 = tagalogText.getText().toString(); String textA = text0.substring(0, 1).toUpperCase() + text0.substring(1).toLowerCase();
When I hung over him, he says:
Implicitly using the default locale is a common source of bugs: Use toUpperCase(Locale) instead.
and
Implicitly using a standard locale is a common source of errors: use toLowerCase (Locale) instead.
I am copying code from Java, not Java for android. Does anyone know how to remove this error? And why now is this the preferred way to use this method?
Theresa gamit
source share