Java Character isLowerCase() Method Tutorial

In this section, we will learn what the Character isLowerCase() method is and how to use it in Java.

What is Java Character isLowerCase() Method?

The `isLowerCase()` method is used to check whether or not the target character that we set as the argument of the method is a lowercase letter.

Java isLowerCase() Method Syntax:

static boolean isLowerCase(char ch)

isLowerCase() Method Parameters:

The method takes one argument and that is the character we want to check and see if it’s a lowercase letter or not.

isLowerCase() Method Return Value:

The return value of this method is boolean.

If the character was lowercase, then the result will be `true` otherwise is `false`.

Example: using Character isLowerCase() method

public class Simple {

    public static void main(String args[]) {

       String  s = "You Never Know What Will Happen Tomorrow";
       for (char c: s.toCharArray()){
           System.out.print(Character.isLowerCase(c)+", ");
       }
    }
}

Output:

false, true, true, false, false, true, true, true, true, false, false, true, true, true, false, false, true, true, true, false, false, true, true, true, false, false, true, true, true, true, true, false, false, true, true, true, true, true, true, true,

 

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies