Java program to check whether entered character is uppercase or lowercase

Java program to check whether entered character is uppercase or lowercase. This is a Java program that determines whether the given Alphabets are Uppercase, Lowercase, or Digits. Any character can be used as input. After that, we compare the ASCII value of that character to the three cases provided. If that value is the same, the output will be the same. The source code for the Java program to determine whether given Alphabets are Uppercase, Lowercase, or Digits is available here.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main
{
public static void main(String args[]) throws IOException
{
char m;
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter any letter");
m = (char) bf.read();
if(m >= 97 && m <= 123)
{
System.out.println("Lower Case");
}
else if(m >= 65 && m <= 96)
{
System.out.println("Upper Case");
}
else if(m >= 48 && m <= 57)
{
System.out.println("Number");
}
}
}

Enter any letter g
Lower Case