Share on Google+Share on Google+

Check for character in lower case or not.

Advertisement
This example check for the character in lowercase or not.

Description:

This tutorial demonstrate the use of Character.isLowerCase() method which checks   whether the value stored in char data-type varible is in lower case or not.

Code:

public class CheckLower {
  public static void main(String[] args) {
    char charVar = 'a';
    if (Character.isLowerCase(charVar)) {
      System.out.println("true");
    else {
      System.out.println("false");
    }
  }
}

Output:

Download this code

Advertisements

Advertisement

Posted on: June 28, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.