Program to print alphabets both in small and capital

 

Program to print alphabets both in small and capital.

/**
 * This program is used to print alphabets both in small and capital.
 * @author W3spoint
 */
public class Alphabets {
      public static void main(String args[]){
            char ch;
            System.out.println("Small Alphabets: ");
            for( ch = 'a' ; ch <= 'z' ; ch++ ){
               System.out.println(ch);
            }           
 
            System.out.println("Capital Alphabets: ");
            for( ch = 'A' ; ch <= 'Z' ; ch++ ){
               System.out.println(ch);
            }
         }
}

Output:

Small 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
Capital 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

 

Content Protection by DMCA.com
Please Share