Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

OCP question pag. 942  RSS feed

 
Dana Ucaed
Ranch Hand
Posts: 390
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying to resolve the problem , page 842,

OCA/OCP Java® SE 7
Programmer I & II
Study Guide


And assuming the two queries are valid, what is the result of executing this fragment?
A. Query 1 and Query 2 are rolled back ( no change to the database)
B. Query 1 is executed and Query 2 is rolled back
C. Query 1 is executed, Query 2 is executed, and SQLException
D. SQLException
E. A runtime exception is thrown

The correct answer is C.

When I ran my code I don't see 'SQLException' at the console.

I used Derby DB database.

Thanks a lot!

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!