Java OCA OCP Practice Question 2920

Question

Which of the following can fill in the blank to print the month, date, year, hour, minute, and second?

A.   rs.getDate("d");
B.  rs.getLocalDate("d");
C.   rs.getLocalDateTime("d");
D.  rs.getLocalTime("d");
E.  rs.getTime("d");
F.  rs.getTimeStamp("d");


F.

Note

Choices B, C, and D are incorrect because they are not JDBC methods.

Choice A is incorrect because it outputs just the month, date, and year.

Choice E is incorrect because it outputs just the hours, minutes, and seconds.




PreviousNext

Related