Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Beginning Java 2
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Java 2
This is the forum to discuss the Wrox book Beginning Java 2, SDK 1.4 Edition by Ivor Horton; ISBN: 9780764543654
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Java 2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 26th, 2004, 04:54 PM
Authorized User
 
Join Date: Sep 2003
Location: den Haag, , Netherlands.
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default Errors in the book @ ch10

I came to like the errors in the book. They make you think deeper, and you get the understanding that Java isn't quite so easy as Ivor tells you on the front cover.

Ivor(smiling): "It's easier than you think.."

Take this really interesting error I stumbled on in my JDK1.3 version chapter 10 @ page 416. The code example there is erroneous:

transactions.removeAll(transactions.subList(5,15)) ;

If you try this example, a ConcurrentModificationException is thrown.
Why? The API docs offer an explanation.
Because the subList is backed by this List, its 'fail-fast' iterator fails fast.

I think this is a real miss of Ivor, not because of the error itself, but because the concept of 'concurrent modification' deserved some attention in the context of Iterator and List.
Illustrating this with the example the API gives, plus a little explanation, could have been such an elegant contribution to the subject matter in the book:

transactions.subList(5,15).clear();

Don't mistake me: I love the book, and I am much stimulated by the occasional errors in it, how paradoxical this may seem!

FavaQ
onwards to chapter 11





 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Submitting errors within this book JakobH BOOK Beginning CSS: Cascading Style Sheets for Web Design, 2nd Ed; ISBN: 978-0-470-09697-0 4 July 13th, 2007 01:01 PM
Chapter 10 code errors in the book GranDad BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 January 26th, 2007 12:25 AM
Book Errors? zoltac007 BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 June 6th, 2006 06:42 AM
Professional PHP4 - Ch10 Coding Ftp Client Errors ajberry_12 All Other Wrox Books 2 January 13th, 2004 12:35 AM



All times are GMT -4. The time now is 08:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.