VOOZH about

URL: https://www.geeksforgeeks.org/java/character-isvalidcodepoint-method-in-java-with-examples/

⇱ Character.isValidCodePoint() Method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Character.isValidCodePoint() Method in Java with Examples

Last Updated : 6 Dec, 2018
The Character.isValidCodePoint() is an inbuilt method in java that determines whether the specified code point mentioned in the parameter is a valid Unicode code point value or not. Syntax:
public static boolean isValidCodePoint(int codePoint)
Parameters: The parameter codePoint is of Integer datatype and refers to the unicode code point that is to be tested. Return Values: This method returns true if the specified code point value is between MIN_CODE_POINT and MAX_CODE_POINT inclusive, false otherwise. Below Programs illustrates the use of Character.isValidCodePoint() method: Program 1:
Output:
c1 is a valid Unicode code point is true
c2 is a valid Unicode code point is false
Program 2:
Output:
c1 is a valid Unicode code point is true
c2 is a valid Unicode code point is false
Reference: https://docs.oracle.com/javase/7/docs/api/java/lang/Character.html#isValidCodePoint(int)
Comment