import javax.swing.JFrame; import javax.swing.JOptionPane; public class SupplementaryCharTest2 { public static void main(String[] args) { int codePoint = 0x00010400; char[] ch = Character.toChars(codePoint); System.out.format("ch[0] = %X ch[1] %X\n", (int)ch[0], (int)ch[1]); System.out.format("%X is High: %b Low: %b%n", (int)ch[0], Character.isHighSurrogate(ch[0]), Character.isLowSurrogate(ch[0])); System.out.format("%X is High: %b Low: %b%n", (int)ch[1], Character.isHighSurrogate(ch[1]), Character.isLowSurrogate(ch[1])); String str = new String(new int[]{codePoint}, 0, 1); JOptionPane.showMessageDialog((JFrame)null, String.format("U+0010400 : %s%n", str)); } }