@Override public void adicionar(Conta c) { try { Statement st; st = conexao.getConnection().createStatement(); String sql = "insert into contas values (" + c.getNumero() + "," + c.getSaldo() + ")"; st.executeUpdate(sql); } catch (Exception e) { e.printStackTrace(); } }
@Override public void atualizar(Conta c) { try { Statement st; st = conexao.getConnection().createStatement(); String sql = "update contas set saldo = " + c.getSaldo() + "where nro_contas = " + c.getNumero(); st.executeUpdate(sql); } catch (Exception e) { e.printStackTrace(); } }