is character ASCII Letter - Java java.lang

Java examples for java.lang:char

Description

is character ASCII Letter

Demo Code


//package com.java2s;

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

    public static boolean isLetter(final char c) {
        int asciival = c;
        if ((asciival >= 65 && asciival <= 90)
                || (asciival >= 97 && asciival <= 122)) {
            return true;
        }
        return false;
    }
}

Related Tutorials