Skip to content

Commit 089a176

Browse files
Print Chars From A To Z
Print Chars From A To Z Co-Authored-By: Manish Upadhyay <ermanishupadhyay@gmail.com>
1 parent 2ce23aa commit 089a176

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package JavaPrograms;
2+
3+
public class PrintCharsFromAToZ {
4+
5+
public static void main(String[] args) {
6+
// print chars from A to Z
7+
8+
for(char c = 'A'; c<='Z'; c++) {
9+
//System.out.println(c + " ");
10+
11+
// to print in same line
12+
System.out.print(c + " ");
13+
}
14+
15+
}
16+
17+
}

0 commit comments

Comments
 (0)