Multiple Choice Question

Quiz Guidelines

 

QID: 
347
Question: 

What will the following program print?

public class TestClass{
public static void main(String[] args){
for : for(int i = 0; i< 10; i++){
for (int j = 0; j< 10; j++){
if ( i+ j > 10 ) break for;
}
System.out.println( "hello");
}
}
}

Select 1 option

A. It will print hello 6 times.
B. It will not compile.
C. It will print hello 2 times.
D. It will print hello 5 times.
E. It will print hello 4 times.

Q&A Set: