1.

Using Scanner class accept a number and check whether it’s an “alphabet”, a “digit”, ,”space” or “special symbol”.

Answer»

Input : 8 OUTPUT : Digit Input : E Output : AlphabetExplanation:JAVA // Java program to find type of input character import java.io.*;  class GFG {      static void charCheck(char input_char)    {        // CHECKING FOR ALPHABET        if ((input_char >= 65 && input_char <= 90)            || (input_char >= 97 && input_char <= 122))            System.out.println(" Alphabet ");          // CHECKING FOR DIGITS        else if (input_char >= 48 && input_char <= 57)            System.out.println(" Digit ");    } }  hope it HELPS



Discussion

No Comment Found