Skip to content

Instantly share code, notes, and snippets.

@javautodidacta
Created February 4, 2018 17:13
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 javautodidacta/e836c7d0b1b106819fe63efe7f530a33 to your computer and use it in GitHub Desktop.
Save javautodidacta/e836c7d0b1b106819fe63efe7f530a33 to your computer and use it in GitHub Desktop.
Esta clase crea un objeto de tipo Persona con nombre y edad.
package es.javautodidacta;
/**
* This class creates a {@code Persona} object.
*
* @author Miguel Callejón Berenguer
* @version 2018.02
*/
public class Persona {
private String nombre;
private int edad;
public Persona(String nombre, int edad) {
this.nombre = nombre;
this.edad = edad;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public int getEdad() {
return edad;
}
public void setEdad(int edad) {
this.edad = edad;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment