black

登录

单项选择题

程序填空题: 从数据库student表中查询所有学生并放入ArrayList中。 Connection con=null; Statement stmt=null; ResultSet rs=null; String uri = "jdbc:mysql://localhost:3306/st"; List<student> list=new ArrayList<student>(); try { 【 1 】=DriverManager.getConnection(uri,"root",""); 【 2 】=con.createStatement(); rs=stmt.【 3 】(“【 4 】sname,sid,score from student”); while(rs.next()) { Student s=new Student(); s.sname=rs.【 5 】(“sname”); s.sid=rs.【 5 】(“sid”); s.score=rs.getFloat(“score”); list.add(s); } rs.close; stmt.close(); con.close(); } catch(SQLException e) { System.out.println(e.getMessage()); }

A.getConnection(uri,"root","");
B.createStatement();
C.【
D.next())
E.sname=rs.【
F.sid=rs.【
G.score=rs.getFloat(“score”);
H.add(s);
I.close;
J.close();
K.close();
L.out.println(e.getMessage());
相关考题

未知题型 设备运转时,操作工人可以短时间离开岗位()

未知题型 项目所指的三横是珠外环高速公路、将军大街、G321国道()

单项选择题 【单选题】My grandfather gave a ______ sum of money to my college fund.

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064