Solved

What Will Be the Output of the Following Code Snippet

Question 9

Multiple Choice

What will be the output of the following code snippet? boolean token1 = true;
While (token1)
{
For (int i = 0; i < 10; i++)
{
System.out.println("Hello") ;
}
Token1 = false;
}


A) No output.
B) Hello will be displayed 10 times.
C) Hello will be displayed 9 times.
D) Hello will be displayed infinite times.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions