Character.isHighSurrogate(): This method is available in java.lang.Character class of Java.
Syntax:
boolean java.lang.Character.isHighSurrogate(char ch)
This method takes one argument of type char as its parameter. This method determines if the given char value is a Unicode high-surrogate code unit.
Parameters: One parameter is required for this method.
ch: the char value to be tested.
Returns: true if the char value is between MIN_HIGH_SURROGATE and MAX_HIGH_SURROGATE inclusive; false otherwise.
Exceptions: NA
Approach
Java
public class CharacterisHighSurrogate {public static void main(String[] args) {char ch = 'a';System.out.println(Character.isHighSurrogate(ch));}}
Output:
false
No comments:
Post a Comment