Java Character.isLetter(char ch)

Syntax

Character.isLetter(char ch) has the following syntax.

public static boolean isLetter(char ch)

Example

In the following code shows how to use Character.isLetter(char ch) method.


//from   w w w .j  a  v a2  s.  c  om
public class Main {

   public static void main(String[] args) {
      char ch1 = 'A',ch2 = '9';

      boolean b1 = Character.isLetter(ch1);
      boolean b2 = Character.isLetter(ch2);

      System.out.println( ch1 + " is a letter is " + b1 );
      System.out.println( ch2 + " is a letter is " + b2 );
   }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable