This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Q8. Which statement is true about following code segment. Suppose all objects are valid objects. (Select One) rs.addRecord(rec1, 0, rec1.length); rs.addRecord(rec2, 0, rec2.length); rs.addRecord(rec3, 0, rec3.length); rs.deleteRecord(2); rs.getRecord(2, data, 0); A. This code will successfully compile and run. B. This code will compile fine but will throw an exception at runtime. C. This code will successfully compile and run if �rs.deleteRecord(2)� is removed. D. This code will not be compiled.
Hi, Answer c seems correct to me. After the 3 addRecord() calls there are 3 records in the RecordStore. Don't confuse the addRecord() and setRecord() methods. The add record doesn't indicate the 'recordId'. Hope that helps,
Raising Flares debut album 'Ignition' out now
Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
Joined: Jul 01, 2003
For me is 'b'. When you call
The Record which index is 2 is DELETED from the RecordStore. Then you call
that throws a InvalidRecordIDException. This question is very simple, I don't know why is generating so much doubts.