question: public static String changePassword ( Connection conn , String userName , String password ) throws Exception { PreparedStatement prep = conn . prepareStatement ( "UPDATE USERS SET PASSWORD=? WHERE NAME=?" ) ; prep . setString ( 1 , password ) ; prep . setString ( 2 , userName ) ; prep . executeUpdate ( ) ; return password ; }
target:  Utility method to change a password of a user. This method is secure, except that the old password is not checked.