Signup/Sign In
LAST UPDATED: NOVEMBER 24, 2020

Java Character isLowerCase(int codePoint) Method

Java isLowerCase(int codePoint) method is a part of Character class. This method is used to check whether the specified Unicode codepoint character is a lowercase letter or not.

This method does not handle supplementary characters. A character is lowercase if its general category type, provided by Character.getType(ch), is LOWERCASE_LETTER, or it has contributory property Other_Lowercase as defined by the Unicode Standard.

Syntax:

public static boolean isLowerCase(int codePoint)  

Parameters:

The parameter passed is the Unicode codepoint character to be checked whether it is a lowercase character or not.

Returns:

Returns the boolean value true if the specified character is a lowercase character else return false.

Example 1:

Here, the characters are checked whether they are lowercase or not.

public class StudyTonight
{  
	public static void main(String[] args)
	{  
		int cp1 = 48;  
		int cp2 = 61;  
		int cp3 = 119;  
		int cp4 = 90;   
		int cp5 = 1232;  

		boolean b1 = Character.isLowerCase(cp1);  
		boolean b2 = Character.isLowerCase(cp2);  
		boolean b3 = Character.isLowerCase(cp3);  
		boolean b4 = Character.isLowerCase(cp4);  
		boolean b5 = Character.isLowerCase(cp5);  

		System.out.println((char)cp1 +" is a lowercase??:  "+b1);  
		System.out.println((char)cp2 +" is a lowercase??:  "+b2);  
		System.out.println((char)cp3 +" is a lowercase??:  "+b3);  
		System.out.println((char)cp4 +" is a lowercase??:  "+b4);  
		System.out.println((char)cp5 +" is a lowercase??:  "+b5);  
	}  
} 


0 is a lowercase??: false
= is a lowercase??: false
w is a lowercase??: true
Z is a lowercase??: false
? is a lowercase??: false

Example 2:

Here is a user-defined example where anyone using this code can put a value of his choice and get the equivalent output.

import java.util.Scanner; 
public class StudyTonight
{  
	public static void main(String[] args)
	{  
		try
		{
			System.out.print("Enter the Unicode character: ");  
			Scanner sc = new Scanner(System.in);        
			int cp = sc.nextInt(); 
			boolean b = Character.isLowerCase(cp);
			System.out.println((char)cp + " is a lowercase?: "+b);
		}
		catch(Exception e)
		{
			System.out.println("Invalid Input!!");
		}
	}  
}


Enter the Unicode character: 78
N is a lowercase?: false
**************************************
Enter the Unicode character: 101
e is a lowercase?: true

Live Example:

Here, you can test the live code example. You can execute the example for different values, even can edit and write your examples to test the Java code.



About the author:
A Computer Science and Engineering Graduate(2016-2020) from JSSATE Noida. JAVA is Love. Sincerely Followed Sachin Tendulkar as a child, M S Dhoni as a teenager, and Virat Kohli as an adult.