0% found this document useful (0 votes)
3 views1 page

Java Uppercase String Conversion

This Java code sample demonstrates how to convert a string to uppercase in two ways: by using the standard toUpperCase() method to convert the entire string, and by specifying a Locale of "CHINA" to convert using Chinese uppercase rules which may treat certain characters differently. The string is first defined and then printed in uppercase form using each of the two conversion methods.

Uploaded by

Anton Paz de
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Java Uppercase String Conversion

This Java code sample demonstrates how to convert a string to uppercase in two ways: by using the standard toUpperCase() method to convert the entire string, and by specifying a Locale of "CHINA" to convert using Chinese uppercase rules which may treat certain characters differently. The string is first defined and then printed in uppercase form using each of the two conversion methods.

Uploaded by

Anton Paz de
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Lorem import [Link].

Locale;
public class UpperCaseExample{
public static void main(String args[]){
String str = new String("this is a test string");
//Standard method of conversion
[Link]([Link]());

//By specifying Locale


[Link]([Link]([Link]));
}
}

You might also like