How to check if character is a letter in Java?

To check if character is a letter in Java, use the Character.isLetter method.

For example, this is how you can check if the first chracter of a string is a letter:

String string = "Hello World!";
char firstCharacter = string.charAt(0);

System.out.println(Character.isLetter(firstCharacter)); // true