Java isLetter() 方法

Java 教程 · 2019-02-08 16:57:34

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

语法

boolean isLetter(char ch)

参数

  • ch -- 要测试的字符。

返回值

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

实例

public class Test {

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

以上程序执行结果为:

true
false

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

查看所有标签

Looking For a Challenge

Looking For a Challenge

the University of Warsaw / the University of Warsaw / 2012-11 / 0

LOOKING FOR PROGRAMMING CHALLENGES? Then this book is for you! Whether it's the feeling of great satisfaction from solving a complex problem set, or the frustration of being unable to solve a task,......一起来看看 《Looking For a Challenge》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

SHA 加密
SHA 加密

SHA 加密工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具