变量范围不对,改动如下try
{
Class.forName(driver);
Connection con=DriverManager.getConnection(connectString);
}
catch(SQLException sqle)
{}=>
Connection con;
try
{
Class.forName(driver);
con=DriverManager.getConnection(connectString);
}
catch(SQLException sqle)
{}
{
Class.forName(driver);
Connection con=DriverManager.getConnection(connectString);
}
catch(SQLException sqle)
{}=>
Connection con;
try
{
Class.forName(driver);
con=DriverManager.getConnection(connectString);
}
catch(SQLException sqle)
{}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货