toUpperCase() 方法将字符串小写字符转换为大写。
public String toUpperCase()
或
public String toUpperCase(Locale locale)
无
字符转换为大写后的字符串。
public class Test {
public static void main(String args[]) {
String Str = new String("www.itzixishi.com");
System.out.print("返回值 :" );
System.out.println( Str.toUpperCase() );
}
}
以上程序执行结果为:
返回值 :WWW.ITZIXISHI.COM
©2020 IT自习室京ICP备20010815号