You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
625 B

2 years ago
  1. package Package;
  2. import java.io.Serializable;
  3. public class Persona implements Serializable{
  4. private int id;
  5. private String nombre;
  6. private int edad;
  7. public Persona(int id, String nombre, int edad) {
  8. this.id = id;
  9. this.nombre = nombre;
  10. this.edad= edad;
  11. }
  12. public Persona() {
  13. this.nombre=null;
  14. }
  15. public int getId() {
  16. return id;
  17. }
  18. public String getNombre() {
  19. return nombre;
  20. }
  21. public void setNombre(String nombre) {
  22. this.nombre = nombre;
  23. }
  24. public int getEdad() {
  25. return edad;
  26. }
  27. public void setEdad(int edad) {
  28. this.edad = edad;
  29. }
  30. }