• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can You Find the Error in this SCJP6 Study Guide Mock Exam Question?

 
Steve Marriott
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following code has been entered exactly as printed in the SCJP6 Study Guide. The Guide says that the correct answer to this question is: A) "The output could contain 30", and B) "The output could contain @bf73fa".

It is true that the designated output is produced IF you change one line...if you don't, the code as written wont compile.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


They invoke the method "getValue()" as "getBidValue()".
 
Steve Marriott
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernest Friedman-Hill wrote:

They invoke the method "getValue()" as "getBidValue()".


Very good; you got it!
 
Rob Spoor
Sheriff
Pie
Posts: 20546
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This error has probably been corrected in the errata. Check those out; you can probably get them from their website.
 
Steve Marriott
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:This error has probably been corrected in the errata. Check those out; you can probably get them from their website.


I'll do that just to make sure they know about it, but it's gratifying to have identified it myself.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In any book containing any significant amount of code you will almost *always* find a number of errors.

The exception is with companies that actually do the right thing and use live code snippets with accompanying unit tests. These are the exception rather than the rule.
 
Steve Marriott
Greenhorn
Posts: 15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:In any book containing any significant amount of code you will almost *always* find a number of errors.

The exception is with companies that actually do the right thing and use live code snippets with accompanying unit tests. These are the exception rather than the rule.


Who would expect otherwise (even though the book was undoubtably thoroughly reviewed by the writers and publsher)? I'm just pleased and gratified to have found one myself; it validates my effort to learn and confirms that I am in fact making progress in my studies. My objective is, after all, to understand this stuff.
 
Steve Marriott
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:This error has probably been corrected in the errata. Check those out; you can probably get them from their website.


Rob, I found the following link from a posting several years ago (below is an excerpt). I followed the specified link, but don't see any mention of errata; can you provide a current link to the errata page? Thanks.

....Once the majority of the content is written, updates and corrections are handled by the editors. It's a McGraw-Hill publication, so you're best providing the feedback to them:

McGraw Hill Editorial Services
 
Campbell Ritchie
Sheriff
Pie
Posts: 49367
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the McGraw-Hill link to what I think is the book in question. I tried ctrl-F --- errata/corrigenda and didn't find anything. There may be an "errata" or "corrigenda" link in the book.

I think this thread would sit better on another forum. Moving.
 
Steve Marriott
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:This is the McGraw-Hill link to what I think is the book in question. I tried ctrl-F --- errata/corrigenda and didn't find anything. There may be an "errata" or "corrigenda" link in the book.

I think this thread would sit better on another forum. Moving.


Thanks for moving this thread; I didn't realize this was here. Presumably, the editors read this thread, so I expect my posting to the link you provided is redundant and unnecessary.
Cheers.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic