\"Auto increment\" alphabet in Java - is this possible? From A to Z without a third-party library?
Here's the code without a third-party library,
public class JavaPrintAlphabet
{
public static void main(String[] args)
{
System.out.println("Printing the alphabets from A to Z : ");
char alpha;
for(alpha = 'A'; alpha <= 'Z'; alpha++)
{
System.out.println(alpha);
}
}
}
Output
Printing the alphabets from A to Z : 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
For more on a Java program to print the alphabet, refer this resource.