后端如何节省代码占用空间
public Connection connect; public Thesql()throws Exception { Class.forName("com.mysql.jdbc.Driver"); String url="jdbc:mysql://localhost:3306/pddabc?useUnicode=true&characterEncoding=utf8"; String username="root"; String password="Njx200259"; connect = DriverManager.getConnection(url,username,password); } public void finalize() throws Exception { connect.close(); }