Character class wraps a value of the primitive type Java Character in an object. An object of type Character contains a single field whose type is char. Example
char ch = 'a'; // Char
char uniChar = '\u039A'; // Unicode for char
char[] charArray = { 'a', 'b', 'c', 'd', 'e' }; // Array of chars
Important functions :
- char charValue()
Returns the value of this Character object. - static int compare(char x, char y)
Compares two char values numerically. - static int digit(char ch, int radix)
Returns the numeric value of the character ch in the specified radix. - static boolean isAlphabetic(int codePoint)
Determines if the specified character (Unicode code point) is an alphabet. - static boolean isDigit(char ch)
Determines if the specified character is a digit. - static boolean isLetter(char ch)
Determines if the specified character is a letter. - static boolean isLowerCase(char ch)
Determines if the specified character is a lowercase character. - static boolean isUpperCase(char ch)
Determines if the specified character is an uppercase character. - static boolean isWhitespace(char ch)
Determines if the specified character is white space according to Java. - static char toLowerCase(char ch)
Converts the character argument to lowercase using case mapping information from the UnicodeData file. - static char toUpperCase(char ch)
Converts the character argument to uppercase using case mapping information from the UnicodeData file.