Character.isValidCodePoint(): This method is available in java.lang.Character class of Java.
Syntax:
boolean java.lang.Character.isValidCodePoint(int codePoint)
This method takes one argument of type int as its parameter. This method determines whether the specified code point is a valid Unicode code point value.
Parameters: One parameter is required for this method.
codePoint: the Unicode code point to be tested.
Returns: true if the specified code point value is between MIN_CODE_POINT and MAX_CODE_POINT inclusive; false otherwise.
Exceptions: NA
Approach
Java
public class CharacterisValidCodePoint {public static void main(String[] args) {int codePoint = 'A';System.out.println(Character.isValidCodePoint(codePoint));}}
Output:
true
No comments:
Post a Comment