Java Character isLowerCase() MethodThe isLowerCase(char ch) method of Character class determines whether the given(or specified) character is a lowercase character or not. A character is considered to be a lowercase character if the general category given by Character.getTyper(char ch) is a LOWERCASE_LETTER or it has some contributory properties. SyntaxParameterch: It is the character that needs to be tested. Return ValueThe isLowerCase(char ch) method returns a Boolean value i.e. true if the given(or specified) character is in lowercase. Otherwise, the method returns false. Example 1Output: Enter the first character:H The first character 'H' is not in lower case. Enter the second character:h The second character 'h' is in lower case. Example 2Test it NowOutput: The first character 'A' is in lower case: false The second character 'b' is in lower case: true The third character 'M' is in lower case: false The fourth character 'k' is in lower case: true Example 3Test it NowOutput: The first character 'A' is in lowercase: false The second character 'a' is in lowercase: true The third character '_' is in lowercase: false Java Character isLowerCase() MethodThe isLowerCase(int codePoint) method of character class determines whether the given(or specified) character is a lowercase character or not. A character is considered to be a lowercase character if the general category given by Character.getTyper(int codePoint) is a LOWERCASE_LETTER or it has some contributory properties. SyntaxParameterscodePoint: It is the codePoint which is the character that needs to be tested. Return ValueThe isLowerCase(int codePoint) method returns a Boolean value, i.e., true if the given(or specified) character is in lowercase. Otherwise, the method returns false. Example 1Test it NowOutput: The first codePoint '77' is in lowercase: false The second codePoint '116' is in lowercase: true The third codePoint '198' is in lowercase: false The fourth codePoint '102' is in lowercase: true Example 2Test it NowOutput: The first character represents as a lowercase character: false The second character represents as a lowercase character: false
Next TopicJava Character
|