Java Character highSurrogate() MethodThe highSurrogate(intcodePoint) method of Character class generally returns the current surrogate codePoint for the given surrogate pair which indicates the supplementary character in the UTF encoding. If the given character is not specified(or valid), an unspecified char is returned. SyntaxParametercodePoint: It is a supplementary character that needs to be tested. Return ValueThe highSurrogate(intcodePoint)method of Character class returns the current surrogate code unit which is used to indicate the character in the UTF-16 encoding. Example 1Test it NowOutput: The leading surrogate for the codePoint 6587 is given as:? The leading surrogate for the codePoint 67324 is given as:? Example 2Test it NowOutput: The integer value for the character 2 is given as: ? The integer value for the character { is given as: ? The integer value for the character * is given as: ? The integer value for the character @ is given as: ? The integer value for the character $ is given as: ?
Next TopicJava Character
|