1、写出利用JDBC操作数据库的步骤,数据库为jdbc,用户表为users,用户名:root,密码:root。publicclassExample01 {@Testpublicvoidtest1() throwsSQLException {Statement stmt= null;ResultSet rs= null;Connection conn= null;try{// 1. 注册数据库的驱动(1)__________________________________// 2.通过DriverManager获取数据库连接(2)__________________________________String username= "root";String password= "root";(3)__________________________________// 3.通过Connection对象获取Statement对象(4)_________________________________// 4.使用Statement执行SQL语句。String sql= "select * from users";(5) __________________________________// 5. 操作ResultSet结果集System.out.println("id | name | password | email | birthday");while(rs.next()) {intid= rs.getInt("id"); // 通过列名获取指定字段的值String name= rs.getString("name");String psw= rs.getString("password");String email= rs.getString("email");Date birthday= rs.getDate("birthday");System.out.println(id+ " | "+ name+ " | "+ psw+ " | "+ email+ " | "+ birthday);}} catch(ClassNotFoundException e) {e.printStackTrace();} finally{ // 6.回收数据库资源if(rs!=null) {try{rs.close();} catch(SQLException e) {e.printStackTrace();} rs= null;}if(stmt!=null) {try{stmt.close();} catch(SQLException e) {e.printStackTrace();} stmt= null;}if(conn!=null) {try{conn.close();} catch(SQLException e) {e.printStackTrace();} conn= null;}}}}