正在加载图片...
连接数据库 取得 Connection try i string url dbc: mysql://localhost: 3306/demo? " nuser=root &password=123 Connection conn DriverManager getConnection(url)i catch(SQLException e) String url ="jdbc: mysql: //localhost: 3306/demo"; String user =rooti String password =123 Connection conn DriverManager getConnection(url, user, password)i连接数据库 • 取得Connection try { String url = "jdbc:mysql://localhost:3306/demo?" + "user=root&password=123"; Connection conn = DriverManager.getConnection(url); .... } catch(SQLException e) { .... } String url = "jdbc:mysql://localhost:3306/demo"; String user = "root"; String password = "123"; Connection conn = DriverManager.getConnection(url, user, password);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有