public void openConn()
{
....
PreparedStatement prepare=theConnection.prepareStatement(sql);//here the reason!
...
}prepare=theConnection.prepareStatement(sql);//不用再次声明为局域变量
{
....
PreparedStatement prepare=theConnection.prepareStatement(sql);//here the reason!
...
}prepare=theConnection.prepareStatement(sql);//不用再次声明为局域变量
可以看的清楚一些