Skip to content

Instantly share code, notes, and snippets.

@comtom
Last active August 29, 2015 13:58
Show Gist options
  • Save comtom/10210287 to your computer and use it in GitHub Desktop.
Save comtom/10210287 to your computer and use it in GitHub Desktop.
package pack;
public class Alumno {
private String nombre;
private String apellido;
private int edad;
public Alumno(String nombre, String apellido, int edad){
this.nombre = nombre;
this.apellido = apellido;
this.edad = edad;
}
@Override public String toString() {
return this.getNombreyApellido();
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public void setApellido(String apellido) {
this.apellido = apellido;
}
public void setEdad(int edad) {
this.edad = edad;
}
public String getNombre() {
return nombre;
}
public String getApellido() {
return apellido;
}
public String getNombreyApellido() {
return nombre +" "+ apellido;
}
public int getEdad() {
return edad;
}
public static void main(String[] args) {
System.out.println("Ejecute primero el otro, no sea bolu..");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment