0

A 1 B 2 C 3 D 4 E 5 F 6 G 7 H 8 I 9 J 10 K 11 L 12 M 13 N 14 O 15 P 16 Q 17 R 18 S 19 T 20 U 21 V 22 W 23 H 24 Y 25 Z 26 pleas help Me....java coding ......one looping use

29th Aug 2016, 4:53 AM
Aung Moe Hein
Aung Moe Hein - avatar
5 Answers
+ 3
Another version char ch; int i; for( ch = 'A',i = 1 ; ch <= 'Z' ; i++,ch++ ) System.out.println(ch + " " + i);
29th Aug 2016, 7:46 AM
WPimpong
WPimpong - avatar
+ 1
WPimpong simplified it, I like his. :)
29th Aug 2016, 7:50 AM
James
James - avatar
+ 1
Thanks @James
29th Aug 2016, 8:00 AM
WPimpong
WPimpong - avatar
+ 1
Thank's ,WPimpong and James.
30th Aug 2016, 12:57 PM
Aung Moe Hein
Aung Moe Hein - avatar
0
Maybe something like this? public class Program { public static void main(String[] args) { char[] letters = new char[27]; letters[0] = ' '; int increment = 1; for(char ch = 'A'; ch <= 'Z'; ch++){ letters[increment] = ch; System.out.println(letters[increment] + " " + increment); increment++; } } }
29th Aug 2016, 5:46 AM
James
James - avatar