-
-
Save parzibyte/19570a82f4f2467de4717e1fe84477a2 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 Persona { | |
private String nombre, direccion; | |
private int edad; | |
public Persona(String nombre, int edad, String direccion) { | |
this.nombre = nombre; | |
this.edad = edad; | |
this.direccion = direccion; | |
} | |
@Override | |
public String toString() { | |
return "Nombre: " + this.nombre + " edad: " + this.edad + ", direccion: " + this.direccion; | |
} | |
public String getNombre() { | |
return this.nombre; | |
} | |
public String getDireccion() { | |
return this.direccion; | |
} | |
public int getEdad() { | |
return this.edad; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment