Java Character lowSurrogate() MethodThe lowSurrogate(int codePoint) method of Character class returns the trailing surrogate code unit which is used for the representation of the character in the UTF-16 encoding. On the other hand, if the specified character is not a supplementary character, an unspecified char is returned. If the method isSupplementaryCodePoint (x) is true, the method isLowSurrogate(lowSurrogate(x)) and the method toCodePoint(highSurrogate(x), lowSurrogate(x))==x are also true. SyntaxParameterThe above method requires only one parameter: a.) The codePoint which is the character that needs to be tested. Return ValueThe lowSurrogate(int codePoint) method returns the trailing code unit which is used as the representation of the character in the UTF-16 encoding. Example 1Output: The current surrogate code unit for the character65 is:? The current surrogate code unit for the character152 is:? The current surrogate code unit for the character567 is:? Example 2Output: The codePoint '49' is a current surrogate code unit. The codePoint '121' is a current surrogate code unit. The codePoint '2342' is a current surrogate code unit. Next TopicJava-character-offsetbycodepoints-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