Question: Based on the method below, what is the scope of k? 00 private void drawTriangle(int size) 01 { 02 for (int i = 1; i

Based on the method below, what is the scope of k?

00 private void drawTriangle(int size) 01 { 02 for (int i = 1; i <= size; i++) 03 { 04 for (int j = 0; j < size - i; j++) 05 System.out.print(". "); 06 for (int k = 0; k < 2 * i - 1; k++) 07 System.out.print("o "); 08 for (int j = 0; j < size - i; j++) 09 System.out.print(". "); 10 System.out.println(); 11 } 12 }

a. lines 06-11

b. lines 03-11

c. lines 01-12

d. lines 06-07

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 Databases Questions!