revert Primero
This commit is contained in:
2026-10-02 13:36:08 +02:00
parent 6d857d7250
commit ac6513a41e
5 changed files with 15 additions and 67 deletions
@@ -9,10 +9,6 @@ public class Continente {
this.codigoContinente = codigoContinente;
this.nombre = nombre;
}
public Continente() {
}
public String getCodigoContinente() {
return codigoContinente;
+6 -3
View File
@@ -51,9 +51,12 @@ public class Pais {
@Override
public String toString() {
return nombre + " (" + id + "), con capital en " + capital
+ " pertenece a " + continente.getNombre()
+ " (" + continente.getCodigoContinente() + ")";
return "Pais{" +
"id=" + id +
", nombre = '" + nombre + '\'' +
", capital = '" + capital + '\'' + "," +
continente +
'}';
}
}