What is the method for converting strings in Java between upper and lower case?
What is the method for converting strings in Java between upper and lower case?
There are methods in the String class; toUppercase() and toLowerCase().
i.e.
String input = "Cricket!";
String upper = input.toUpperCase(); //stores "CRICKET!"
String lower = input.toLowerCase(); //stores "cricket!"
This will clarify your doubt
Yes. There are methods on the String itself for this.
Note that the result depends on the Locale the JVM is using. Beware, locales is an art in itself.