Test: AP Computer Science A

public void countStatements() {

       int a = 10, b = 15, c = 7;

       // Start

       for(int i = 0; i < a; i += 2) {

              b--;

              System.out.print("*");

       }

       for(int i = b; i >=0; i--) {

              for(int j = 0; j < c; j++) {

                     System.out.print("*");

              }

       }

       // End

}

1.

In the code above, how many times will System.out.print be called between the comments "// Start" and "// End"?

1/12 questions

0%
Learning Tools by Varsity Tutors