Hello everyone!
I found the following question in the book "OCP 11 Practice Tests" by Jeanne Boyarsky & Scott Selikoff (page 9, question 24):
"How many of the following lines compile?
bool b = null;
Bool bl = null;
int i = null;
Integer in = null;
String s = null;
A. None
B. One
C. Two
D. Three
E. Four
F. Five"
In the appendix (page 444) it is specified that the correct result is C (because Integer and String are objects). What if we have a class called Bool? then "Bool bl = null" is correct, and compiles. I understand that bool cannot be used instead of "boolean" but Bool can represent a class (not "Boolean" of course). Isn't the correct answer D?
I'm a little confused, please help me understand
Thank you!
Roxana