Home » Java programming language

Java Character class isLowerCase() method with example

Character class isLowerCase() method: Here, we are going to learn about the isLowerCase() method of Character class with its syntax and example.
Submitted by Preeti Jain, on October 26, 2019

Character class isLowerCase() method

  • isLowerCase() method is available in java.lang package.
  • isLowerCase() method is used to check whether the given char value is lowercase or not.
  • isLowerCase() method does not throw an exception at the time of checking the given char value is lowercase or not.

Syntax:

    public boolean isLowerCase (Char value);

Parameter(s):

  • Char value – represents the char value to be checked.

Return value:

The return type of this method is boolean, it returns a boolean value based on the following cases,

  • It returns true, if the given char value is lowercase.
  • It returns false, if the given char value is not in lowercase.

Example:

// Java program to demonstrate the example 
// of boolean isLowerCase (Char value) method of Character class

public class IsLowerCaseOfCharacterClass {
    public static void main(String[] args) {
        // It returns false because the passing character is 
        // not in LowerCase
        boolean result1 = Character.isLowerCase('P');

        // It returns true because the passing character is 
        // in LowerCase 
        boolean result2 = Character.isLowerCase('p');

        // Display values of result1 , result2
        System.out.println("Character.isLowerCase('P'): " + result1);
        System.out.println("Character.isLowerCase('p'): " + result2);
    }
}

Output

Character.isLowerCase('P'): false
Character.isLowerCase('p'): true





Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.