Javatpoint Logo
Javatpoint Logo

Java Character getName() Method

The 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.

Syntax

Parameter

The above method requires only one parameter:

The codePoint : It is the character (Unicode code point)

Return Value

character or null if the codePoint is unassigned.

Example 1

Test it Now

Output:

The first character ' ' has the Unicode name as: NULL 

Example 2

Test it Now

Output:

The character ']' has the unicode name as: RIGHT SQUARE BRACKET
The character 'E' has the unicode name as: LATIN CAPITAL LETTER E

Example 3

Test it Now

Output:

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



Please Share

facebook twitter google plus pinterest