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 1Output: The leading surrogate for the codePoint 6587 is given as:? The leading surrogate for the codePoint 67324 is given as:? Example 2Output: 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-isalphabetic-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India