Java toUpperCase() 方法

Java 教程 · 2019-02-09 08:13:16

toUpperCase() 方法将字符串小写字符转换为大写。

语法

public String toUpperCase()

或

public String toUpperCase(Locale locale)

参数

返回值

字符转换为大写后的字符串。

实例

public class Test {
    public static void main(String args[]) {
        String Str = new String("www.codercto.com");

        System.out.print("返回值 :" );
        System.out.println( Str.toUpperCase() );
    }
}

以上程序执行结果为:

返回值 :WWW.CODERCTO.COM

点击查看所有 Java 教程 文章: https://codercto.com/courses/l/12.html

查看所有标签

CSS3 Solutions

CSS3 Solutions

Marco Casario / Apress / 2012-8-13 / GBP 35.50

CSS3 brings a mass of changes, additions, and improvements to CSS across a range of new modules. Web designers and developers now have a whole host of new techniques up their sleeves, from working wit......一起来看看 《CSS3 Solutions》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具