Latest web development tutorials

Java isLetter () method

Java Character class Java Character class


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

grammar

boolean isLetter(char ch)

parameter

  • ch - the character to be tested.

return value

If the character is a letter, it returns true; otherwise false.

Examples

public class Test {

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

The above program execution results:

true
false

Java Character class Java Character class