Class.forName("com.mysql.jdbc.Driver"); this.conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/daodb","root","password");
输出conn 为啥是NULL
没有异常抛出吗?
贴出来的代码没有任何问题,如果你确定你的数据库是正常的,最好把代码贴完整一点
抛什么异常了,就这样看代码是没有问题的