Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 19, 2022 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/df1e5dbf441866d0e5334da9a3cf00f4 to your computer and use it in GitHub Desktop.
Save parzibyte/df1e5dbf441866d0e5334da9a3cf00f4 to your computer and use it in GitHub Desktop.
class Nodo {
private String dato;
private Nodo izquierda, derecha;
public Nodo(String dato) {
this.dato = dato;
this.izquierda = this.derecha = null;
}
public String getDato() {
return dato;
}
public Nodo getIzquierda() {
return izquierda;
}
public void setIzquierda(Nodo izquierda) {
this.izquierda = izquierda;
}
public Nodo getDerecha() {
return derecha;
}
public void setDerecha(Nodo derecha) {
this.derecha = derecha;
}
public void imprimirDato() {
System.out.println(this.getDato());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment