@@ -9,10 +9,6 @@ public class Continente {
|
||||
this.codigoContinente = codigoContinente;
|
||||
this.nombre = nombre;
|
||||
}
|
||||
|
||||
public Continente() {
|
||||
|
||||
}
|
||||
|
||||
public String getCodigoContinente() {
|
||||
return codigoContinente;
|
||||
|
||||
@@ -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 +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user