Java Character getName() MethodThe getName(int codePoint) method returns the Unicode name of the specified character or null if the codePoint is unassigned. If the Unicode Data file does not assign the specified character a name, the returned name is same as the result of the expression. SyntaxParameterThe above method requires only one parameter: The codePoint : It is the character (Unicode code point) Return Valuecharacter or null if the codePoint is unassigned. Example 1Test it NowOutput: The first character ' ' has the Unicode name as: NULL Example 2Test it NowOutput: The character ']' has the unicode name as: RIGHT SQUARE BRACKET The character 'E' has the unicode name as: LATIN CAPITAL LETTER E Example 3Test it NowOutput: The first character 'P' has the unicode name as: LATIN CAPITAL LETTER P The second character '7' has the unicode name as: DIGIT SEVEN The third character 'n' has the unicode name as: LATIN SMALL LETTER N The fourth character '?' has the unicode name as: COMBINING CARON
Next TopicJava Character
|