Question: Add a nested while or for.....in loop to this program public class LetterE { public static void main ( String [ ] args ) {

Add a nested while or for.....in loop to this program
public class LetterE {
public static void main(String[] args){
final int NUM_ACROSS =4;
final int NUM_DOWN =6;
int row =1;
int column;
while (row < NUM_DOWN){
for (column =1; column < NUM_ACROSS; column++){
if (row ==1|| row ==3|| row ==5){
System.out.print("*");
} else {
if (column ==1){
System.out.print("*");
} else {
System.out.print("");
}
}
}
System.out.println();
row++;
}
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!