The statement
System.out.println("\ud840\udc00".codePointAt(0));
returns
131072, because both \ud840 and \udc00 are surrogate characters.
If one say
JTextPane htmlPane = new JTextPane();
htmlPane.setEditorKit(new HTMLEditorKit());
htmlPane.setText("<html><head></head><body>𠀀</body></html>");
the entity reference won't be parsed correctly into a surrogate pair.
System.out.println(htmlPane.getText());
returns
<html>
<head>
</head>
<body>
�
</body>
</html>
rather than
<html>
<head>
</head>
<body>
��
</body>
</html>
or at least
<html>
<head>
</head>
<body>
𠀀
</body>
</html>