jdbc操作实例代码
//1. 加载驱动Class.forName("com.mysql.jdbc.Driver");//2. 获取连接Connection connection = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/dbName", "userName", "password");Statement stmt = connection.createStatement();
一:加载驱动类
二:获取连接