Java Program to Print All Alphabets
The following Java program prints all alphabets in English language. This program uses the Java character variable and built-in ordering of the character variable values. The following program prints both capital letters and small letters.
Write a Java Program to Print All English Alphabets
// Java program to print all english alphabets
public class AllAlphabets {
public static void main(String[] args) {
System.out.print("Capital alphabets in english are : ");
for(char c='A'; c<='Z';c++) {
System.out.print(c+",");
}
System.out.println();
System.out.print("Small alphabets in english are : ");
for(char c='a'; c<='z';c++) {
System.out.print(c+",");
}
System.out.println();
}
}