public boolean delete(Libros l){
        PreparedStatement ps;
        try {
            ps = mycon.prepareStatement("DELETE FROM Libros WHERE codigo=?");
            ps.setString(1, l.getCodigolibro());
            return (ps.executeUpdate()>0);
        } catch (SQLException ex) {
            Logger.getLogger(LibrosCRUD.class.getName()).log(Level.SEVERE, null, ex);
        }
        return false;
    }