File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes wrappers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "wrappers" Watch "wrappers" New topic


sun par
Ranch Hand

Joined: Oct 03, 2002
Posts: 257
Can anyone suggest some resources for wrappers or is the API enough?

Sunita<br />SCJP 1.4
chi Lin
Ranch Hand

Joined: Aug 24, 2001
Posts: 348
Sun Par,
You should have the API handy/bookmarked to get detailed information when the need arises.
For exam pueporse, I feel chapter 8 of RHE book
give good enough Wrapper resource.

not so smart guy still curious to learn new stuff every now and then
Kathy Sierra
Cowgirl and Author

Joined: Oct 10, 2002
Posts: 1589
The API is enough -- just make sure you pay close attention to the methods mentioned in the objectives... but there is also one error in the objectives, so here is what you DO need to know about wrappers:
doubleValue, floatValue, intValue, etc.
parseXxx (the parse methods)
And here's the error:
the formal objectives say the exam covers the getXxx methods. That is NOT correct.
The exam does NOT cover the getXxx methods, however it DOES cover the valueOf() methods, so even though they are not listed in the objectives, you do need to know them!!
Know especially which methods (including constructors) might throw a NumberFormatException (hint: anything that has to parse a String...)
Be sure you understand also how .equals() works for Wrappers. Like, what happens if you compare two wrappers of the same type with the same value? What about two wrappers of DIFFERENT types (long and int, for example) that have the same value?
And would a wrapper be acceptable as a key in a HashMap?
All you need is in the API.
Of course if you happen to have an extra $34.95 US and no place to spend it...
-Don't forget: a Java certification book makes a wonderful Valentine's day gift for that special someone.
sun par
Ranch Hand

Joined: Oct 03, 2002
Posts: 257
Thanks Kathy, Chi..
I agree. Here's the link:
subject: wrappers
It's not a secret anymore!