Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Errata for Java 2 Study Guide? (K&B)  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't see this mentioned in the offical errata document, nor could I find mention of it on the forums.

Sun Certified Programmer and Developer for Java 2 Study Guide (Exam 310-035 and 310-037)

Top of Page 265

switch (x) {
case 2: y = 3;
case 3: y = 17;
case 4: y = 27;
default: assert false; // We're never supposed to get here!
}

The problem is, you will always get there because a lack of break statements will always cause us to fall-through to the default statement.
 
author
Sheriff
Posts: 8981
19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pretty amazing Mike!

That error has been sitting there for 3 1/2 years and no one spotted it, we even copied it over to the new 1.5 edition of the book.

Great catch!

So, you're 1 for 1 - I hope your accuracy rate goes down

Bert
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice first post! Welcome to Javaranch Mike.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!