String.toUpperCase(Locale locale) has the following syntax.
public String toUpperCase(Locale locale)
In the following code shows how to use String.toUpperCase(Locale locale) method.
/*from w ww. java 2 s. c o m*/ import java.util.Locale; public class Main { public static void main(String[] args) { String s = "java2s.com"; System.out.println(s.toUpperCase(Locale.getDefault())); } }
The code above generates the following result.