1、n=temp1.length()*temp2.length();
temp1或temp2可能为null;2、Connection con=DriverManager.getConnection(url);
Statement stmt=con.createStatement(); con可能为null;
temp1或temp2可能为null;2、Connection con=DriverManager.getConnection(url);
Statement stmt=con.createStatement(); con可能为null;
if (temp1!=null)||(temp2!=null){
//你的代码}
con为空是指建立数据库连接失败。