• Post Reply Bookmark Topic Watch Topic
  • New Topic

Errata on the review questions of chapter 10 JDBC - Sybex  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the kindle version of the OCP JP8 study Guide book, question 18 has A as the answer. (Same in the questions in Sybex)





But the answer is E because the statement was not set to be TYPE_SCROLL_INSENSITIVE or sensitive.
Using conn.createStatement() creates a statement with the default behavior TYPE_FORWARD_ONLY.

image_jdbc.png
[Thumbnail for image_jdbc.png]
image_jdbc2.png
[Thumbnail for image_jdbc2.png]
image_jdbc3.png
[Thumbnail for image_jdbc3.png]
 
author & internet detective
Marshal
Posts: 38272
627
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Omar,
Welcome to CodeRanch!

You are correct. In fact this was already reported (originally here) and is in the errata
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, shouldn't the question explicitly state what indexes the animals have?

The "A" is based on assumption that Anna has the smallest index among other animals, because this query

is identical to this







 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 38272
627
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Fedor Chernogorskiy wrote:By the way, shouldn't the question explicitly state what indexes the animals have?


No. Indexes don't exist in the simplified world of the exam.

In the real world, indexes don't change the results of a query like this though; just the speed. The order by clause uses ascending order by default.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!