java.lang.Character isLowerCase(int codePoint)
Description
A character is lowercase if its general category type, provided by getType(codePoint), is LOWERCASE_LETTER, or it has contributory property Other_Lowercase as defined by the Unicode Standard.
The isLowerCase(int codePoint) method of Character class is static thus it should be accessed statically which means the we would be calling this method in this format:
Character.isLowerCase(int codePoint)
Non static method is usually called by just declaring method_name(argument) however in this case since the method is static, it should be called by appending the class name as suffix. We will be encountering a compilation problem if we call the java isLowerCase() method non statically.
Method Syntax
public static boolean isLowerCase(int codePoint)
Method Argument
Data Type | Parameter | Description |
---|---|---|
int | codepoint | the character (Unicode code point) to be tested. |
Method Returns
The isLowerCase(int codePoint) method of Character class returns true if the character is lowercase; false otherwise.
Compatibility
Requires Java 1.5 and up
Java Character isLowerCase(int codePoint) Example
Below is a simple java example on the usage of isLowerCase(int codePoint) method of Character class.
package com.javatutorialhq.java.examples; /* * This example source code demonstrates the use of * isLowerCase(int codePoint) method of Character class. */ public class CharacterIsLowerCaseCodePointExample { public static void main(String[] args) { // declare a codepoint int codepoint = 89; // check if the codepoint is lower case or not boolean checkBool = Character.isLowerCase(codepoint); // convert codepoint to character char ch = (char)codepoint; // print result if(checkBool){ System.out.print("User input '"+ch+"' is lower case"); } else{ System.out.print("User input '"+ch+"' is not lower case"); } } }
Sample Output
Below is the sample output when you run the above example.