Java Data Type Tutorial - Java Character.isLetterOrDigit(int codePoint)








Syntax

Character.isLetterOrDigit(int codePoint) has the following syntax.

public static boolean isLetterOrDigit(int codePoint)

Example

In the following code shows how to use Character.isLetterOrDigit(int codePoint) method.

public class Main {
/*from  w  w w  .j ava  2  s. c  o  m*/
  public static void main(String[] args) {
    int cp1 = 0x0033, cp2 = 0x023;

    boolean b1 = Character.isLetterOrDigit(cp1);
    boolean b2 = Character.isLetterOrDigit(cp2);

    System.out.println(b1);
    System.out.println(b2);
  }
}

The code above generates the following result.