public static boolean deletestudent(int id) {

        boolean result = false;
        Connection con = getcon();
        try {
            String stusql = "delete  from testtable where id=?";
            PreparedStatement stmt = null;
            stmt = getcon().prepareStatement(stusql);
            stmt.setInt(1, id);
           int count=stmt.executeUpdate();
            if (count==1) {
                result = true;
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            try {
                con.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        return result;


    }