Java Character check Surrogate
public class Main { public static void main(String[] args) { int codePoint = Character.codePointAt("\u0011", 0); System.out.println("isBmpCodePoint: " + Character.isBmpCodePoint(codePoint)); System.out.println("isSurrogate: " + Character.isSurrogate('\u0022')); System.out.println("highSurrogate: " + (int) Character.highSurrogate(codePoint)); System.out.println("lowSurrogate: " + (int) Character.lowSurrogate(codePoint)); System.out.println("isAlphabetic: " + Character.isAlphabetic(codePoint)); System.out.println("isIdeographic: " + Character.isIdeographic(codePoint)); System.out.println("getName: " + Character.getName(codePoint)); }/*w w w. ja va2s . co m*/ }