Question

Trace the execution of the following Java code:     public class Flow {         public static void main(String[] args) {             int count = 0;             for (int i = 0; i < 2; i++) {                 for (int j = 0; j < 3; j++) {                     count++;                 }             }             System.out.println(count);         }     }     What is the output?

B 2
C 3
D 5
E 6
Practice Next

Hey! Ask a query