

MCQOPTIONS
Saved Bookmarks
1. |
What will be the output of the program (in jdk1.6 or above)?
|
A. | z |
B. | x z |
C. | <!--<p> Answer:The compiler fails at line 13 because b1 is a reference variable to a <i class="java-code">Boolean</i> wrapper object, not a boolean primitive. Logical boolean tests can't be made on <i class="java-code">Boolean</i> objects.</p> --> |
D. | y z |
E. | Compilation fails. |
Answer» C. <!--<p> Answer:The compiler fails at line 13 because b1 is a reference variable to a <i class="java-code">Boolean</i> wrapper object, not a boolean primitive. Logical boolean tests can't be made on <i class="java-code">Boolean</i> objects.</p> --> | |