Java Character toCodePoint() MethodThe toCodePoint(char high, char low) method of character class generally converts the specified surrogate pair into its supplementary codePoint value. The above method does not validate the given surrogate pair. The caller must need to validate it by using isSurrogatePair if necessary. SyntaxParameterThe above method requires two parameters: a.)The high surrogate codePoint. b.)The low surrogate codePoint. Return ValueThe toCodePoint(char high, char low) method returns the supplementary codePoint from the given surrogate pair. Example 1Test it NowOutput: The result for the above charactetr is given as:65808 Example 2Test it NowOutput: The result for the above character is given as:324896 The result for the above character is given as:-624864
Next TopicJava Character
|