anyone plz solve this problem (java)
Attachments:
Answers
Answered by
0
Answer:
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char ch;
System.out.println("Enter your Character");
ch = sc.next().charAt(0);
if(Character.isLetter(ch))
{
System.out.println("Character is a letter.");
}
else if(Character.isDigit(ch))
{
System.out.println("Character is a digit.");
}
else
{
System.out.println("It is a special character");
}
}
}
Similar questions