Computer Science, asked by Anonymous, 29 days ago

Write a JAVA program to accept a character and check whether it is a letter, digit or a special character.
All the best !

Answers

Answered by CopyThat
8

Program :  {JAVA}

public class Prog1

{

   void get(char ch)

   {

       if(Character.isLetter(ch))

       System.out.println("Entered character is a Letter:  "+ch);

       else if(Character.isDigit(ch))

       System.out.println("Entered character is  a Digit:  "+ch);

       else

       System.out.println("Entered character is a Special character:  "+ch);

   }

}

Similar questions