Javatpoint Logo
Javatpoint Logo

Java Character isLowSurrogate() Method

The 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.

Syntax

Parameter

ch: It is the character that needs to be tested.

Return Value

The 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 1

Test it Now

Output:

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 2

Test it Now

Output:

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 3

Output:

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




Help Others, Please Share

facebook twitter pinterest