Question: Question - 1 4 : What does the following method printMy'Triangle prints when it is called with the argument 4 ? public static void printMyTriangle

Question-14:
What does the following method printMy'Triangle prints when it is called with the argument 4?
public static void printMyTriangle (int sideLength){
if (sideLength 1
return;
}
printMyTriangle (sideLength -1);
for (int i=0;i sideLength; i++){
System.out.print("[]");
}
System.out.println();
}
e.)
a.)
c.)
[]
[]
[][][][]
[]
[][]
[]
[]
[][][]
[][]
[][][][]
[][][]
[]
b.)
d.)
[][][][]
[]
[][][]
[][]
[][]
[][][]
 Question-14: What does the following method printMy'Triangle prints when it is

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!