Java tutorial
public class Main { public static void main(String[] args) { int cp = 0x0036; char dst[] = Character.toChars(cp); int res = Character.toChars(cp, dst, 0); if (res == 1) { System.out.println("It is a BMP code point"); } else if (res == 2) { System.out.println("It is a is a supplementary code point"); } } }