【C011002】What is the result of compiling and executing the following fragment of code:
Boolean flag = false;
if (flag = true)
{
System.out.println(“true”);
}
else
{
System.out.println(“false”);
}
A.The code fails to compile at the “if” statement.
B.An exception is thrown at run-time at the “if” statement.
C.The text“true” is displayed.
D.The text“false”is displayed.
E.Nothing is displayed.