ectdbc=null; booleanIsExist=false; try{ dbc=newDBConnect(); Connectionconn=dbc.getDBConnection(); Statementstmt=null; stmt=conn.createStatement(); ResultSetrs=null; rs=stmt.executeQuery("SELECTPasswordFROMusersWHEREUserName='"+_UserName+"'"); if(!rs.next()){ IsExist=false; } else{ if(_Password.equals(rs.getString("Password"))) IsExist=true; } } catch(Exceptione){ System.err.println(e); } finally{ try{ dbc.close(); } catch(Exceptione){ e.printStackTrace(); } } returnIsExist;?}publicstaticStringModifyPassword(String_UserName,String_NewPassword){ DBConnectdbc=null; try{ dbc=newDBConnect(); Connectionconn=dbc.getDBConnection(); Statementstmt=null; stmt=conn.createStatement(); stmt.executeUpdate("UPDATEusersSETPassword='"+_NewPassword+"'WHEREusername='"+_UserName+"'"); dbc.close(); return"1"; }