Nested For loop output63 - Java Quiz Question


What will be the output of the following program?


A
i = 8 j = 0
i = 9 j = 1
i = 10 j = 2
i = 11 j = 3
B
i = 8 j = 0
i = 8 j = 1
i = 8 j = 2
i = 8 j = 3
i = 10 j = 0
i = 10 j = 1
i = 10 j = 2
i = 10 j = 3
C
Compilation error since we can not give j++ and i++ in the same statement, only one of them can be given.
D
Compilation error since break can be used only in the outer loop, but here we are using in the inner loop.