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 2 K&B typos? 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 "2 K&B typos?" Watch "2 K&B typos?" New topic

2 K&B typos?

Vad Fogel
Ranch Hand

Joined: Aug 25, 2003
Posts: 504
p. 371

The methods ceil(), floor(), and round() all take floating-point
arguments and return integer equivalents (although again, delivered in a double variable).

round() is overloaded to return int or long.
p. 381

Long L3 = Long.valueOf("101010", 2); // binary String to Long object
System.out.println("L3 value = " + L3); // result is "L2 value = 42"
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Did you check the errata?

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I agree. Here's the link:
subject: 2 K&B typos?
It's not a secret anymore!