Java

Program to Check Alphabet.

Program to Check Alphabet.
import java.util.*;
import java.lang.*;
import java.io.*;

public class Alphabet {
    public static void main(String[] args) {
        char c = '1';
        if( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
            System.out.println(c + " is an alphabet.");
        else
            System.out.println(c + " is not an alphabet.");
    }
}
Nikhil Juneja

Passionate software developer and technical contributor at TutorialsLink.