What will be the output of the following program?
Correct Answer : A
main the first statement assigns
b1. Thus in display statement b1 = false is printed and cursor will not go to the next line since we used the method
print() but not
println(). The next statement re-assigns
b1. Thus now
true and b1 = true is printed using display statement.
Topic: Boolean Literals In Java