Java program to display English alphabets

Java Programming Java8Object Oriented Programming

Following is an example to display English alphabets A to Z.

Example

Live Demo

public class DisplayingAtoZ {
   public static void main(String args[]){
      char ch;
      System.out.println("List of alphabets are ::");
      for(ch = 'A'; ch <= 'Z'; ch++ ){
         System.out.print(ch+" ");
      }
   }
}

Output

List of alphabets are ::
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
raja
Published on 26-Apr-2018 11:54:26
Advertisements