-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab9.java
More file actions
21 lines (17 loc) · 797 Bytes
/
lab9.java
File metadata and controls
21 lines (17 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.*;
public class lab9
{ //Program by Pranay Bokde
public static void main(String[] args)
{
char ch;
Scanner sc=new Scanner(System.in);
System.out.println("Enter the Charcter:");
ch=sc.next().charAt(0); //taking value of character
if (ch >= 'A' && ch <= 'Z') //comparing input value for uppercase
System.out.println( ch +" is an UpperCase character.");
else if (ch >= 'a' && ch <= 'z') //comparing input value for lowercase
System.out.println( ch + " is an LowerCase character." );
else
System.out.println( ch +" is a special symbol." ); //not a lowercase nor uppercase character it a symbol
}
}