-
-
Save parzibyte/df1e5dbf441866d0e5334da9a3cf00f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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