Use Character.isLowerCase, Character.isUpperCase to check the letter case in Java
Description
The following code shows how to use Character.isLowerCase, Character.isUpperCase to check the letter case.
Example
//from www. j a v a 2 s . c o m
public class Main {
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'));
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »