Java implementation of the Character class
KW.java
class KW
{
    public static void main(String args[])
    {
        System.out.println("———————————————————————————————————————————");
        System.out.println("Java implementation of Character class");
        System.out.println("———————————————————————————————————————————");
        System.out.println(Character.isLetter('S'));
        System.out.println(Character.isDigit('7'));
        System.out.println(Character.isUpperCase('S'));
        System.out.println(Character.isLowerCase('w'));
        System.out.println(Character.isWhitespace(' '));
        System.out.println(Character.isWhitespace('\n'));
        System.out.println(Character.isWhitespace('\t'));
        System.out.println(Character.isLetter('*'));
        System.out.println(Character.isDigit('@'));
        System.out.println(Character.toLowerCase('A'));
        System.out.println(Character.toUpperCase('a'));
        System.out.println(Character.toString('Q'));
        System.out.println("———————————————————————————————————————————");
    }
}
Output
kodingwindow@kw:~$ javac KW.java
kodingwindow@kw:~$ java KW ——————————————————————————————————————————— Java implementation of Character class ——————————————————————————————————————————— true true true true true true true false false a A Q ——————————————————————————————————————————— kodingwindow@kw:~$
Advertisement