Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
326 B
2
Indexable
Never
@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();
}