Java Character isDefined() MethodThe isDefined(char ch) method of Character class generally determines whether the character is defined in the Unicode or not. A character is defined in Unicode if and only if any of the two conditions are satisfied(or true):
SyntaxParameterThe above method requires only one parameter: a.) The character that needs to be tested. Return ValueThe isDefined(char ch) method returns a Boolean value i.e. true, if the given(or specified) character is given with a defined meaning in the Unicode. Otherwise, it returns false. Example 1Test it NowOutput: The meaning for the character @ is defined as: true The meaning for the character * is defined as: true The meaning for the character & is defined as: true Example 2Test it NowOutput: Enter a character: $ The user input '$' is defined in the Unicode Enter the second character: ) The user input ')' is defined in the Unicode Example 3Test it NowOutput: 1 is defined in the Unicode character set: true 2 is defined in the Unicode character set: true 3 is defined in the Unicode character set: true 4 is defined in the Unicode character set: true 5 is defined in the Unicode character set: true
Next TopicJava Character
|