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

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

王林
王林Original
2020-05-17 15:32:076272browse

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

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!

Statement:
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