• Post Reply Bookmark Topic Watch Topic
  • New Topic

OCP question pag. 942  RSS feed

Ranch Hand
Posts: 441
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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!

There's a way to do it better - find it. -Edison. A better tiny ad:
Why should you try IntelliJ IDEA ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!