|
Is Uppercase
The following example shows how to use Character.isUpperCase() API.
|
package com.bethecoder.tutorials.core.character;
public class CharIsUpperCase {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println(Character.isUpperCase('A'));
System.out.println(Character.isUpperCase('Z'));
System.out.println(Character.isUpperCase(' '));
System.out.println(Character.isUpperCase('\n'));
System.out.println(Character.isUpperCase('a'));
System.out.println(Character.isUpperCase('9'));
}
}
|
| |
It gives the following output,
true
true
false
false
false
false
|
|