Loading...

Character

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

Check character type

char ch = 'a';
if (Character.isLetter(ch)) {      // true
}
if (Character.isDigit(ch)) {       // false
}
if (Character.isLowerCase(ch)) {   // true
}
if (Character.isUpperCase(ch)) {   // false
}
// See Character for more methods.
Please remember the terms for blog comments.