Example usage for java.lang Character isLowerCase

List of usage examples for java.lang Character isLowerCase

Introduction

In this page you can find the example usage for java.lang Character isLowerCase.

Prototype

public static boolean isLowerCase(int codePoint) 

Source Link

Document

Determines if the specified character (Unicode code point) is a lowercase character.

Usage

From source file:Main.java

public static void main(String[] args) {
    char a = 'a';
    if (Character.isLowerCase(a)) {
        System.out.println(a + " is a lowercase character.");
    }//from   w w  w. jav  a  2  s  .c o  m
}

From source file:MainClass.java

public static void main(String[] args) {
    char symbol = 'A';

    if (Character.isLowerCase(symbol)) {
        System.out.println("true");
    } else {//from   w ww  .  j  a  v  a2 s  . c  om
        System.out.println("false");
    }
}

From source file:Main.java

public static void main(String[] args) {
    int cp1 = 0x007a, cp2 = 0x0fff;

    boolean b1 = Character.isLowerCase(cp1);
    boolean b2 = Character.isLowerCase(cp2);

    System.out.println(b1);//www . jav a  2s.c o  m
    System.out.println(b2);
}

From source file:MainClass.java

public static void main(String[] args) {
    System.out.println("Is the Latin symbol z a lowercase letter? " + Character.isLowerCase('z'));

    System.out.println("Is the Latin symbol a an uppercase letter? " + Character.isUpperCase('a'));

}

From source file:MainClass.java

public static void main(String args[]) {
    System.out.println(Character.isLowerCase('a'));
}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    char ch = 'a';
    if (Character.isLetter(ch)) { // true
    }//  w ww.ja v  a  2s .  c o  m
    if (Character.isDigit(ch)) { // false
    }
    if (Character.isLowerCase(ch)) { // true
    }
    if (Character.isUpperCase(ch)) { // false
    }
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    BufferedReader br = new BufferedReader(new FileReader("in.txt"));
    BufferedWriter bw = new BufferedWriter(new FileWriter("out.txt"));
    int i;/* www. j a  v  a2  s . c om*/
    do {
        i = br.read();
        if (i != -1) {
            if (Character.isLowerCase((char) i))
                bw.write(Character.toUpperCase((char) i));
            else if (Character.isUpperCase((char) i))
                bw.write(Character.toLowerCase((char) i));
            else
                bw.write((char) i);
        }
    } while (i != -1);
    br.close();
    bw.close();
}

From source file:Main.java

public static void main(String[] args) {

    char a[] = { 'a', 'b', '5', '?', 'A', ' ' };

    for (int i = 0; i < a.length; i++) {

        if (Character.isDigit(a[i]))
            System.out.println(a[i] + "is a digit ");
        if (Character.isLetter(a[i]))
            System.out.println(a[i] + "is a letter ");
        if (Character.isWhitespace(a[i]))
            System.out.println(a[i] + "is a White Space ");
        if (Character.isLowerCase(a[i]))
            System.out.println(a[i] + "is a lower case ");
        if (Character.isLowerCase(a[i]))
            System.out.println(a[i] + "is a upper case ");
    }/*from  ww w . jav a2 s.c  o  m*/

}

From source file:IsDemo.java

public static void main(String args[]) {
    char a[] = { 'a', 'b', '5', '?', 'A', ' ' };

    for (int i = 0; i < a.length; i++) {
        if (Character.isDigit(a[i]))
            System.out.println(a[i] + " is a digit.");
        if (Character.isLetter(a[i]))
            System.out.println(a[i] + " is a letter.");
        if (Character.isWhitespace(a[i]))
            System.out.println(a[i] + " is whitespace.");
        if (Character.isUpperCase(a[i]))
            System.out.println(a[i] + " is uppercase.");
        if (Character.isLowerCase(a[i]))
            System.out.println(a[i] + " is lowercase.");
    }//from  w  w  w.jav  a  2  s.co  m
}

From source file:Main.java

public static void main(String[] args) {
    // Using the constructor
    Character c1 = new Character('A');

    // Using the factory method - preferred
    Character c2 = Character.valueOf('2');
    Character c3 = Character.valueOf('-');

    // Getting the wrapped char values
    char cc1 = c1.charValue();
    char cc2 = c2.charValue();
    char cc3 = c3.charValue();

    System.out.println("c1 = " + c1);
    System.out.println("c2 = " + c2);
    System.out.println("c3 = " + c3);

    // Using some Character class methods on c1
    System.out.println("isLowerCase c1    = " + Character.isLowerCase(cc1));
    System.out.println("isDigit c1    = " + Character.isDigit(cc1));
    System.out.println("isLetter c1    = " + Character.isLetter(cc1));
    System.out.println("Lowercase of  c1    = " + Character.toLowerCase(cc1));

    // Using some Character class methods on c2
    System.out.println("isLowerCase c2    = " + Character.isLowerCase(cc2));
    System.out.println("isDigit c2    = " + Character.isDigit(cc2));
    System.out.println("isLetter c2    = " + Character.isLetter(cc2));
    System.out.println("Lowercase of  c2    = " + Character.toLowerCase(cc2));

    System.out.println("Uppercase of  c3    = " + Character.toUpperCase(cc3));

}