Java Character isValidCodePoint() MethodThe isValidCodePoint(int codePoint) method of Character class determines whether the given(or specified) character is a valid Unicode code point or not. SyntaxParameterThe above method requires only one parameter: a.) The codePoint which is the character that needs to be tested. Return ValueThe isValidCodePoint(int codePoint) method returns a Boolean value, i.e., true if the given(or specified) character lies in the range between MIN_CODE_POINT and MAX_CODE_POINT. Otherwise, this method returns false. Example 1Test it NowOutput: The codePoint '12' is a valid codepoint : true The codePoint '51' is a valid codepoint : true The codePoint '121' is a valid codepoint : true The codePoint '160' is a valid codepoint : true Example 2Test it NowOutput: The first codePoint '121' is a valid codePoint :true The second codePoint '128' is a valid codePoint :true The third codePoint '227' is a valid codePoint :true The fourth codePoint '342' is a valid codePoint :true Example 3Test it NowOutput: The first codePoint '323' is a valid codePoint :true The second codePoint '345' is a valid codePoint :true The third codePoint '564' is a valid codePoint :true The fourth codePoint '787' is a valid codePoint :true
Next TopicJava Character
|