char highSurrogate = '\uD83D'; char lowSurrogate = '\uDE80'; int codePoint = Character.toCodePoint(highSurrogate, lowSurrogate); System.out.println(codePoint);In this example, we have a pair of surrogate characters that represent a single Unicode character, a musical keyboard emoji. The toCodePoint method is used to convert the surrogate pair into a single code point, which is then printed to the console. The toCodePoint method is part of the java.lang.Character class, which is included in the Java standard library. No additional package or library is needed to use this method.