Untitled

Anonymous
plain_text
05/10/2023 1:53 AM
436 B
24
Indexable
@Override
public String toString() {
    StringBuilder sb = new StringBuilder();
    Nodo temp = cabeza;
    while (temp != null) {
        sb.append(temp.getDato());
        if (temp.getEnlace() != null) {
            sb.append("−>");
        }
        temp = temp.getEnlace();
    }
    return sb.toString();
}
Editor is loading...