Home > Java > javaTutorial > How to determine whether a character is an English letter in java

How to determine whether a character is an English letter in java

王林
Release: 2020-05-17 15:32:56
Original
6315 people have browsed it

How to determine whether a character is an English letter in java

isLowerCase() method is used to determine whether the specified character is a lowercase letter.

isUpperCase() method is used to determine whether the specified character is an uppercase letter.

(Recommended video tutorial: java video)

The specific method is as follows:

Character.isLowerCase(c) || Character.isUpperCase(c) // 判断ch是否是字母字符,如'a','b‘,是返回true。否则返回false
Copy after login

Recommended tutorial: Getting started with java development

The above is the detailed content of How to determine whether a character is an English letter in java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template