1public class PrintAlphabetUsingForLoop
2{
3 public static void main(String[] args)
4 {
5 System.out.println("Printing alphabets from a to z : ");
6 char alphabet;
7 for(alphabet = 'a'; alphabet <= 'z'; alphabet++)
8 {
9 System.out.println(alphabet);
10 }
11 }
12}
1public class Characters {
2
3 public static void main(String[] args) {
4
5 char c;
6
7 for(c = 'A'; c <= 'Z'; ++c)
8 System.out.print(c + " ");
9 }
10}