Java - Write code to check if a char is Letter

Requirements

Write code to check if a char is Letter

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        char ch = 'a';
        System.out.println(isLetter(ch));
    }//w  w  w  . j  a  v a 2  s .  c  o m

    /**
     *
     * @param  ch         The Character.
     *
     * @return true if the character is a capital or lowercase letter.
     *
     */
    public static boolean isLetter(char ch) {
        if (ch >= 'A' && ch <= 'Z' || ch >= 'a' && ch <= 'z')
            return true;

        return false;
    }
}