Java toUpperCase() 方法
Java String类
toUpperCase() 方法将字符串小写字符转换为大写。
语法
public String toUpperCase() 或 public String toUpperCase(Locale locale)
参数
-
无
返回值
字符转换为大写后的字符串。
实例
public class Test {
public static void main(String args[]) {
String Str = new String("www.w3cschool.cn");
System.out.print("返回值 :" );
System.out.println( Str.toUpperCase() );
}
}
以上程序执行结果为:
返回值 :www.w3cschool.cn
Java String类

国外主机测评 - 国外VPS,国外服务器,国外云服务器,测评及优惠码













