Java String toUpperCase()The java string toUpperCase() method returns the string in uppercase letter. In other words, it converts all characters of the string into upper case letter. The toUpperCase() method works same as toUpperCase(Locale.getDefault()) method. It internally uses the default locale. Internal implementationSignatureThere are two variant of toUpperCase() method. The signature or syntax of string toUpperCase() method is given below: The second method variant of toUpperCase(), converts all the characters into uppercase using the rules of given Locale. Returnsstring in uppercase letter. Java String toUpperCase() method exampleTest it NowOutput: HELLO STRING Java String toUpperCase(Locale locale) Method Example 2Output: HELLO STR?NG HELLO STRING Next TopicJava String trim() |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India