wap to wheather a number is character ya symbol
import java.util.Scanner;
class character
{
public static void main(String[] arg)
{
Scanner sc=new Scanner(System.in);
System.out.println("enter character : ");
char ch=sc.next().charAt(0);
if((ch>=65 && ch<=90) || (ch>=97 && ch<=122))
System.out.println("Input character is Alphabet");
else if(ch>=48 &&ch<=57)
System.out.println("Input character is Digts");
else
System.out.println("Input character is a Symbol");
}
}
Comments
Post a Comment