• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic