Java program to print alphabets.

Home / Uncategorized / Java program to print alphabets.

Java program to print alphabets

public class Alphabets 
{
    public static void main(String ar[])
    {
        System.out.println("Alphabets in Lower Case:");
        for( char ch='a';ch<='z';ch++)
        {
            System.out.print(" "+ch);
        }
        System.out.println();
        
        System.out.println("Alphabets in Upper Case:");
        for( char ch='A';ch<='Z';ch++)
        {
            System.out.print(" "+ch);
        }
        System.out.println();
    }
}

Output:

Alphabets in Lower Case:
 a b c d e f g h i j k l m n o p q r s t u v w x y z
Alphabets in Upper Case:
 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Watch video of this program

Leave a Reply

Your email address will not be published. Required fields are marked *