• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCJP 1.6 book from Kathy Sierra mistakes (Printing or anyother)

 
Lokendra Shekhawat
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i found some mistakes in Kathy Sierra SCJP 1.6 book. i don't know were they printing mistakes or not. and please correct me if i am wrong because i am preparing for SCJP exam.

1. Page 458(Chapter 6) there is a line of code like:

name = c.readLine("%s", "input?: "); //#4 return a String

Here "name" variable is not declared it should be like " String name = c.readLine("%s", "input?: ");


2. Page 533(Question no 8): answer says option C(10 0 10) is correct but i think option b(10 0 9) is correct. bec variable z is declared as transient and before we store other variable to file its value was 10 and when we read object back then its value must be reset to 9. not 10. correct me if i am wrong.


I am still reading the book and if i found anymore mistakes i will post it here if any one else found problems like above please post here. so we we all can correct it.
 
W. Joe Smith
Ranch Hand
Posts: 710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lokendra Shekhawat wrote:i found some mistakes in Kathy Sierra SCJP 1.6 book. i don't know were they printing mistakes or not. and please correct me if i am wrong because i am preparing for SCJP exam.

1. Page 458(Chapter 6) there is a line of code like:

name = c.readLine("%s", "input?: "); //#4 return a String

Here "name" variable is not declared it should be like " String name = c.readLine("%s", "input?: ");


2. Page 533(Question no 8): answer says option C(10 0 10) is correct but i think option b(10 0 9) is correct. bec variable z is declared as transient and before we store other variable to file its value was 10 and when we read object back then its value must be reset to 9. not 10. correct me if i am wrong.


I am still reading the book and if i found anymore mistakes i will post it here if any one else found problems like above please post here. so we we all can correct it.


I believe there is already a topic for errata in the Sierra & Bates study guide.
 
Lokendra Shekhawat
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh!! sorry for that will you please guide me to that thread please
 
W. Joe Smith
Ranch Hand
Posts: 710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lokendra Shekhawat wrote:oh!! sorry for that will you please guide me to that thread please


It is a link at the top of the SCJP forum, but it states it is for Java 5. I don't know if there is one specifically for 6 yet.

Teaches me to not research my answer before I post!
 
Alexander Danilou
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2. Page 533(Question no 8): answer says option C(10 0 10) is correct but i think option b(10 0 9) is correct. bec variable z is declared as transient and before we store other variable to file its value was 10 and when we read object back then its value must be reset to 9. not 10. correct me if i am wrong.

In my K&B book variable z declared as static, and y as transient, the last number printed is z, so I believe 10 is correct answer in this case
 
Jay Ceazar Boado
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alexander Danilou wrote:
2. Page 533(Question no 8): answer says option C(10 0 10) is correct but i think option b(10 0 9) is correct. bec variable z is declared as transient and before we store other variable to file its value was 10 and when we read object back then its value must be reset to 9. not 10. correct me if i am wrong.

In my K&B book variable z declared as static, and y as transient, the last number printed is z, so I believe 10 is correct answer in this case


me too, I have z declared as static and y as transient.
 
Lokendra Shekhawat
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my mistake the second one is correct bec variable z is static and it will have value 10 the whole time the class exists. so second one is correct. my mistake
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic