public static boolean addstudent(String name) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
        boolean result = false;
        Connection con = getcon();
        try {
            String stusql = "insert into testtable (name) values(?)";
            PreparedStatement stmt = null;
            stmt = getcon().prepareStatement(stusql);
            //stmt.setInt(1, id);
            stmt.setString(1,name);
            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;
    }