以下程序代码定义了一个ResultSet对象:ResultSet rs= stmt.executeQuery("SELECT NAME,AGE from CUSTOMERS where ID=1");假定以上SQL语句最多只返回一条记录,下面哪些代码能打印结果集中的AGE字段?
A. if(rs.next())System.out.println(rs.getInt(2));
B. if(rs.next())System.out.println(rs.getInt(1));
C. System.out.println(rs.getInt(1));
D. if(rs.next())System.out.println(rs.getInt("AGE"));
查看答案
[音频]1.The man likes reading all kinds of books.
A. 对
B. 错
2.As a middle school student, he enjoyed detective stories.
A. 对
B. 错
3.Now he prefers to read best sellers like Harry Potter.
A. 对
B. 错
4.The woman’s favorite hobby is listening to rock and roll music.
A. 对
B. 错