This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Mock Exam Errata and the fly likes Whizlabs SCJA Prep Kit (Could just be a clarification problem) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Whizlabs SCJA Prep Kit (Could just be a clarification problem)" Watch "Whizlabs SCJA Prep Kit (Could just be a clarification problem)" New topic
Author

Whizlabs SCJA Prep Kit (Could just be a clarification problem)

W. Joe Smith
Ranch Hand

Joined: Feb 10, 2009
Posts: 710
On the practice test for Qhizlabs SCJA Prep Kit, question 2 asks:

Which of the given option is not a primitive wrapper class?

A. Number
B. Char
C. Byte
D. Short
E. Boolean

Now I'm sure that we all know that the answer is B, as the wrapper class for char is Character, not Char. However, the explination is unclear and could be misleading, depending on how the question could appear on the actual exam. The explanation is:

The primitive wrapper classes in Java are Number, Integer, Character, long, Float, Double, Byte, Short, and Boolean. Except for Character, all the other types have the same name as the corresponding primitive data type with the starting letter uppercased. For the primitive type char, the equivalent wrapper class is Character.


I've bolded the line that I believe could be clarified. While Character is different, so is the Integer wrapper since it goes with int. When I first read this sentence it seemed to me that the author had overlooked the Integer wrapper, but then I thought perhaps they were just referring to the wrappers that are provided as answers (which does not include Integer). If read in that mindset then the sentence does make more sense.

Just bringing this to everyone's attention, in case you are using the kit also and didn't dig into it!


SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Whizlabs SCJA Prep Kit (Could just be a clarification problem)
 
Similar Threads
Very Basic Question
String / float Question
question about primitive type and wrapper class
java.lang.Void wrapper class
void