Write a program in Java to display the following pattern:
A
AB
ABC
ABCD
ABCDE
Java
Java Nested for Loops
18 Likes
Answer
publicclassKboatPattern{publicstaticvoidmain(String args[]){for(char i ='A'; i <='E'; i++){for(char j ='E'; j > i; j--){System.out.print(" ");}for(char k ='A'; k <= i; k++){System.out.print(k);}System.out.println();}}}