This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Addition of valueOf(primitive) to K&B for SCJP5?

 
Peter Gade Christensen
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When working with valueOf Methods that return wrapper classes, I think Bert and Kathy need to mention the fact that valueOf can take a primitive (thanks Barry!) too and not only a string and a string+radix?

Eg: Integer i2 = Integer.valueOf("43") returns Integer 43
and so does
Integer i3 = Integer.valueOf(43);

Probably need to include it in Table 3-3 (pg 233) ?

The content of the book is awesome !! (Thanks guys) but the binding is not that great , my books is pretty much in pages and I am using binder clips to keep them bound !

[ September 24, 2006: Message edited by: Barry Gaunt ]
[ September 24, 2006: Message edited by: Peter Gade Christensen ]
 
Keith Lynn
Ranch Hand
Posts: 2399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't speak for Kathy and Bert, but I think they only include information in the book if it's pertinent for the exam.

I'm not sure about your issue with the binding. I have a copy, and the binding is fine.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Peter. The valueOf methods that take primitives are very relevant to the exam. They were introduced in Java 5.0 and the autoboxing mechanism depends on them.
 
Peter Gade Christensen
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bump to see if Bert takes a look see
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Barry, Peter, and Keith,

I think I'm tending to side with Keith on this one, although I'm open for more discussion.

We make a lot of subjective calls about what parts of the API to include in the book - we almost never list all the methods of a given class, usually we list those that we think are on the exam or might be really useful or commonly used.

In other words, once we're sure we've covered the exam contents, we like to use the 80/20 rule to determine what else should be in the book. I guess that valueOf(primitive) is kind of interesting, but I'm not convinced it falls into the 80/20 category...

Again, I'm open to be convinced
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic