/* Output of UpdateCountB.java - Uses PreparedStatements to execute Multiple Queries */ $ java UpdateCountB Test Case 1: SELECT PreparedStatement is: true 1 a 2 b 3 c Test Complete Test Case 2: SELECT - SELECT PreparedStatement is: true 1 a 2 b 3 c PreparedStatement is: true 3 c 2 b 1 a Test Complete Test Case 3: SELECT - UPDATE PreparedStatement is: true 1 a 2 b 3 c PreparedStatement is: false Update Count is: 3 Test Complete Test Case 4: UPDATE - SELECT PreparedStatement is: false Update Count is: 3 PreparedStatement is: true 1 Bar 2 Bar 3 Bar Test Complete Test Case 5: SELECT - UPDATE - SELECT PreparedStatement is: true 1 a 2 b 3 c PreparedStatement is: false Update Count is: 3 PreparedStatement is: true 1 Bar 2 Bar 3 Bar Test Complete Test Case 6: UPDATE - SELECT - DELETE PreparedStatement is: false Update Count is: 3 PreparedStatement is: true 1 Bar 2 Bar 3 Bar PreparedStatement is: false Update Count is: 1 Test Complete Test Case 7: SELECT - UPDATE - SELECT - DELETE - SELECT PreparedStatement is: true 1 a 2 b 3 c PreparedStatement is: false Update Count is: 3 PreparedStatement is: true 1 Bar 2 Bar 3 Bar PreparedStatement is: false Update Count is: 1 PreparedStatement is: true 1 Bar 3 Bar Test Complete