Check if a Character is Lowercase or not in Java

In this post, I will be sharing how to check if a Character is Lowercase or not in Java. We can easily achieve our goal of checking if a Character is Lowercase or not by using the Character.isLowerCase() method.

Read Also: Check if a Character is Uppercase or not in Java

Check if a Character is Lowercase or not in Java

1. Using Character class isLowerCase() method


According to Oracle docs, the Character.isLowerCase() method can be used to determine if the specified character is a lowercase character.

The following are examples of lowercase characters:

a b c d e f g h i j k l m n o p q r s t u v w x y z
'\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6'
'\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE'
'\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6'
'\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF'

Note: Character.isLowerCase() method cannot handle supplementary characters.

Java Program



public class CheckCharacterLowercase {
    public static void main(String args[]) {
        char ch = 'a';
        if(Character.isLowerCase(ch))
        {
            System.out.println("Given character is Lowercase");
        }
        else
        {
            System.out.println("Given character is NOT Lowercase");
        }
    }
}


Output:
Given character is Lowercase


That's all for today. Please mention in the comments if you know any other way of checking if a character is lowercase or not in Java.

About The Author

Subham Mittal has worked in Oracle for 3 years.
Enjoyed this post? Never miss out on future posts by subscribing JavaHungry