Java Character toLowerCase() Method6 Nov 2024 | 4 min read The toLowerCase(char ch) method of Character class converts the given character argument to the lowercase using a case mapping information which is provided by the Unicode Data file. It should be noted that Character.isLowerCase(Character.toLowerCase(ch)) may not always return true for some characters like symbols or ideographs. In actual, the String.toLowerCase() can be used to map the characters into lowercase. There are various benefits of String case mapping as compared to Character case mapping. String case mapping can be used to perform local-sensitive mappings, context-sensitive mappings whereas the Character case mapping cannot be used. SyntaxParameterch: It is the character that needs to be tested. Return ValueThe toLowerCase(char ch)method returns a lowercase of the given character if any. Otherwise, this method returns the character itself. Example 1Output: The lowercase for the first character 'F' is given as: f The lowercase for the second character 'n' is given as: n Example 2Output: Enter the first input:T The character T is converted in the lowercase as: t Enter the second input:i The character i is converted in the lowercase as: i Java Character toLowerCase()MethodThe toLowerCase(int codePoint) method of Character class converts the given character (Unicode code point) argument to the lowercase using a case mapping information which is provided by the Unicode Data file. It should be noted that Character.isLowerCase(Character.toLowerCase(codePoint)) may not always return true for some characters like symbols or ideographs. SyntaxParameterThe above method requires only one parameter: a.)The codePoint(Unicode code point) which is the character that needs to be tested. Return ValueThe toLowerCase(int codePoint)method returns a lowercase of the given character if any. Otherwise, this method returns the character itself. Example 1Output: The character 'W' can be represented in lower case as w The character 'Z' can be represented in lower case as z Example 2Output: The character 'y' can be represented in lower case as y The character '_' can be represented in lower case as _ Next TopicJava-character-tostring-method |
The isValidCodePoint(int codePoint) method of Character class determines whether the given(or specified) character is a valid Unicode code point or not. Syntax public static boolean isValidCodePoint(int codePoint) Parameter The above method requires only one parameter: a.) The codePoint which is the character that needs to be tested. Return Value The isValidCodePoint(int codePoint) method...
4 min read
In Java, There is Character class that is available in Java.lang package, contains number of utility methods to work with Character data. One of these methods is isUpperCase() through which one checks whether a particular given character is an uppercase Character. This method is especially effective...
4 min read
The hashCode() method of Character class generally returns the hash code for the given character. The result of the given method is similar to the result of invoking the charValue() method. Syntax public int hashCode() Parameter N.A. Return Value The hashCode() method of Character class returns the hash code for the given...
4 min read
The isIdentifierIgnorable(int codePoint) method of Character class generally determines whether the specified character can be considered as an ignorable character in Java or a Unicode identifier. The following characters are considered as ignorable characters in Java or Unicode identifier: ISO control characters which do not have whitespace. All the...
4 min read
The isLetterOrDigit(char ch) method of character class determines whether the given(or specified) character is a letter or digit or not. A character is considered to be a letter or digit if the Character.isLetter(char ch) or the Character.isDigit(char ch) method true for the given character. Note: The above method...
9 min read
Java Character digit(char ch, int radix) Method The digit(char ch, int radix) method of character class returns the numeric value of the character. If the radix is not in the range MIN_RADIX<=radix<=MAX_RADIX or if the value of ch is not a valid digit in a particular...
5 min read
The getNumericValue() method of character class returns the int value of the specified character. If the character does not have any int value, -1 is returned. If the character has a numeric value that cannot be represented as a non-negative integer, -2 is returned. Syntax public static int...
2 min read
The toTitleCase(char ch) method of Character class converts the given character argument to the titlercase using a case mapping information which is provided by the Unicode Data file. It should be noted that Character.isTitleCase(Character.TitleCase(ch)) may not always return true for some characters. It has been seen that...
5 min read
The forDigit(int digit, int radix) method of character class determines the character representation for a specific digit in the specified radix. If the value of the digit is not a valid digit in the specified radix or if the value of the radix is not a...
3 min read
The getType(char ch) method of Character class returns a value which indicates the general category of the character. This method is not used for the supplementary characters. We can use the getType(int codePoint) method to support all the Unicode characters including the supplementary. Syntax public static int getType(char...
4 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India