Example:
Uppercase alphabets: 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 Lowercase alphabets: 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
public class PrintAlphabets { public static void main(String args[]) { char ch; //printing uppercase alphabets System.out.println("Uppercase alphabets:"); for(ch='A';ch<='Z';ch++) System.out.print(ch + " "); //printing new line System.out.println(""); //printing lowercase alphabets System.out.println("Lowercase alphabets:"); for(ch='a';ch<='z';ch++) System.out.print(ch + " "); } }
Output
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Program to print alphabets in java
Output
need an explanation for this answer? contact us directly to get an explanation for this answer