Java String toUpperCase() Method With Examples
The java string toUpperCase() method of String class has converted all characters of the string into an uppercase letter. There is two variant of toUpperCase() method. The key thing that is to be taken into consideration is toUpperCase() method worked same as to UpperCase(Locale.getDefault()) method as internally default locale is used.
public String toUpperCase(Locale loc)
public String toUpperCase()
- Type 1: Locale value to be applied as it converts all the characters into
- Type 2: NA
Return Type: It returns the string in uppercase letters.
Note: Lowercase is done using the rules of the given Locale.
WELCOME! TO GEEKSFORGEEKS
GEEKS FOR GEEKS GEEKS FOR GEEKS