Java toUpperCase() 方法

Java 教程 · 2019-02-08 18:11:29

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

语法

char toUpperCase(char ch)

参数

  • ch -- 要转换的字符。

返回值

返回转换后字符的大写形式,如果有的话;否则返回字符本身。

实例

public class Test {

    public static void main(String args[]) {
        System.out.println(Character.toUpperCase('a'));
        System.out.println(Character.toUpperCase('A'));
    }
}

以上程序执行结果为:

A
A

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

查看所有标签

Hacking

Hacking

Jon Erickson / No Starch Press / 2008-2-4 / USD 49.95

While other books merely show how to run existing exploits, Hacking: The Art of Exploitation broke ground as the first book to explain how hacking and software exploits work and how readers could deve......一起来看看 《Hacking》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具