Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2022 19:20
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/19570a82f4f2467de4717e1fe84477a2 to your computer and use it in GitHub Desktop.
Save parzibyte/19570a82f4f2467de4717e1fe84477a2 to your computer and use it in GitHub Desktop.
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