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








Syntax

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

public static boolean isWhitespace(int codePoint)

Example

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

//from   www  . ja  va  2  s  .  c om
public class Main {

   public static void main(String[] args) {
      int cp1 = 0x001c; // represents FILE SEPARATOR
      int cp2 = 0x0abc;

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

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

The code above generates the following result.