Java Character isLowSurrogate() MethodThe isLowSurrogate(char ch) method of character class determines whether the given(or specified) character is a Unicode low-surrogate code unit (which is also known as trailing-surrogate code unit). These values do not represent the characters by themselves, rather than these values are used to represent the supplementary characters in the UTF-26 encoding. SyntaxParameterch: It is the character that needs to be tested. Return ValueThe isLowSurrogate(char ch) method returns a Boolean value, i.e., true if the given(or specified) character lies in between MIN_LOW_SURROGATE and MAX_LOW_SURROGATE. Otherwise, the method returns false. Example 1Test it NowOutput: The first character '?' is a Unicode low-surrogate: true The second character 'a' is a Unicode low-surrogate: false The third character 'Y' is a Unicode low-surrogate: false Example 2Test it NowOutput: The first character '*'is a Unicode low-surrogate: false The second character 'a' is a Unicode low-surrogate: false The third character 'Y' is a Unicode low-surrogate: false The fourth character '#' is a Unicode low-surrogate: false Example 3Output: Enter the first input:H The character 'H' is not a low-surrogate. Enter the second input:) The character ')' is not a low-surrogate. Enter the third input:6 The character '6' is not a low-surrogate..
Next TopicJava Character
|