Java isLetter() Method

Java  Character类Java Character Class


The isLetter() method is used to determine whether the specified character is a letter.

Syntax

public static boolean isLetter(char ch)

Parameters

  • ch-- the character to be tested.

Return Value

Returns true if the character is a letter; otherwise returns false.

Example

public class Test {

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

The output of the above program is:

true
false

Java  Character类Java Character Class

Other Extensions