Below code will print the English alphabets in upper case using simple "for loop". If you want to print in lower case then simply switch the case of A and Z in the for loop.
Output:
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;
for (ch = 'A'; ch <= 'Z'; ch++)
System.out.print(ch + " ");
}
}
Output:
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
Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here.
ReplyDeleteKindly keep blogging. If anyone wants to become a Java developer learn from Java EE Online Training from India.
or learn thru Java EE Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.