Java isUpperCase() 方法

Java 教程 · 2019-02-08 17:41:48

isUpperCase() 方法用于判断指定字符是否为大写字母。

语法

boolean isUpperCase(char ch)

参数

  • ch -- 要测试的字符。

返回值

如果字符为大写,则返回 true;否则返回 false。

实例

public class Test {

    public static void main(String args[]) {
        System.out.println( Character.isUpperCase('c'));
        System.out.println( Character.isUpperCase('C'));
    }
}

以上程序执行结果为:

false
true

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

查看所有标签

The Information

The Information

James Gleick / Vintage / 2012-3-6 / USD 16.95

James Gleick, the author of the best sellers Chaos and Genius, now brings us a work just as astonishing and masterly: a revelatory chronicle and meditation that shows how information has become th......一起来看看 《The Information》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

SHA 加密
SHA 加密

SHA 加密工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器