Write a Java Program to check a alphabet is uppercase or lowercase.
Share
Write a Java Program to check a alphabet is uppercase or lowercase.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
class Brainly
{
public static void main(String args[])
{
char alpha;
System.out.println("Enter an alphabet");
Scanner Demo = new Scanner(System.in);
alpha = Demo.next().charAt(0);
if(alpha >= 97 && alpha <= 123)
{
System.out.println("Entered letter is a lowercase letter");
}
else if(alpha >= 65 && alpha <= 96)
{
System.out.println("Entered letter is an uppercase");
}
else if(alpha >= 48 && alpha <= 57)
{
System.out.println("Entered alphabet is a number");
}
}
}
Hope this helps!
;
Java Program to Check if given Alphabets are Uppercase or Lowercase or Digits
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Alphabet_Check.
public static void main(String args[]) throws IOException.
char m;