This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I know that #223 has been discussed before, but I'm having trouble distinguishing the subtle differences that make these questions have different answers. Can someone explain this to me? #223: In a switch statement, the argument to the case label (case: argument) can be any variable which can fit within an int. Answer: FALSE #325: In a switch statement, the argument to the switch ( ) can be a variable as long as it is compatible with an int. Answer: TRUE
#223: .......the argument to the case label (case: argument) .... #325: .......the argument to the switch ( ) ..... Val, do you notice the difference, in Q#223 it asks about the argument for the case-label, which like Thomas Paul said has to be a constant whereas in Q#325, it asks about the argument for switch(), which can be any variable as long as it is compatible with int. Hope this helps.