This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Which statements correctly declare boolean variables?
A. Boolean isValid = true;
B. boolean isValid = TRUE;
C. boolean isValid = new Boolean(true);
D. boolean isValid - 1;
The answers are A and C but I have a problem with A because it is a Boolean object not a native variable. I believe there should be a distinction because a Boolean can be null but a boolean cannot. Does this make sense or am I just wrong?