public void addUser(String username,String password,String email) 是个方法吧?
public void addUser(String username,String password,String email) {
String sql = "insert into table (username,password,email) values('"+username+"','"+password+"','"+email+"')";
Class.forName("");
Connection con = DriverManager.getConnection("");
PreparedStatement pst = con.preparestatement(sql);
pst.executeUpdate();
return null;
}
===================差不多是这么写吧==================网上有很多全的代码 可以找找
你学过编程么?》