You are on page 1of 1

Question Number 1

Which code segment could execute the stored procedure "countRecs()" located in a
database server?
Choice 1
Statement stmt = connection.createStatement();
stmt.execute("COUNTRECS()");
Choice 2
CallableStatement cs = con.prepareCall("{call COUNTRECS}");
cs.executeQuery();
Choice 3
StoreProcedureStatement spstmt = connection.createStoreProcedure("countRecs()");
spstmt.executeQuery();
Choice 4
PrepareStatement pstmt = connection.prepareStatement("countRecs()");
pstmt.execute();
Choice 5
Statement stmt = connection.createStatement();
stmt.executeStoredProcedure("countRecs()");
------------------------------------------------------------
Question Number 2
if(check4Biz(storeNum) != null) {}
Referring to the above, what datatype could be returned by method check4Biz()?
Choice 1
Boolean
Choice 2
int
Choice 3
String
Choice 4
char
Choice 5
byte

You might also like