![]() |
VOOZH | about |
Java String toUpperCase() method of String class is used to convert all characters of the string into an uppercase letter.
Example:
GEEKSFORGEEKS
Note: Lowercase is done using the rules of the given Locale.
There is 2 variant of toUpperCase() method. The key thing that is to be taken into consideration is toUpperCase() method worked the same as to UpperCase(Locale.getDefault()) method as internally default locale is used.
The toUpperCase(Locale locale) method returns a new String object which is the original string in upper case with respect to the Locale method parameter.
public String toUpperCase(Locale loc)
Parameters:
Example:
GEEKS FOR GEEKS GEEKS FOR GEEKS