Check whether the character is ASCII 7 bit alphabetic lower case in Java
Description
The following code shows how to check whether the character is ASCII 7 bit alphabetic lower case.
Example
// w w w .ja v a 2 s . c o m
public class Main {
public static boolean isAsciiAlphaLower(char ch) {
return ch >= 'a' && ch <= 'z';
}
public static void main(String[] argv) {
System.out.println(isAsciiAlphaLower('a'));
System.out.println(isAsciiAlphaLower('A'));
System.out.println(isAsciiAlphaLower('3'));
System.out.println(isAsciiAlphaLower('-'));
System.out.println(isAsciiAlphaLower('\n'));
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »