feat(ch 5): examples & ex added

This commit is contained in:
Rafa Muñoz
2024-12-03 09:45:41 +01:00
parent 6fcfc243a5
commit bdbffee001
13 changed files with 13 additions and 13 deletions

View File

@@ -0,0 +1,16 @@
package tutorialJava.capitulo5.ej01_cromosBaloncesto;
public class Principal {
public static void main(String[] args) {
Cromo cromoSimple = new Cromo("Iniesta", 1000, "España");
System.out.println("Id del cromo: " + cromoSimple.hashCode());
System.out.println(cromoSimple.toString());
CromoBaloncesto cromo1 = new CromoBaloncesto("Ricky", 100, "Barcelona");
System.out.println("Id del cromo: " + cromo1.hashCode());
System.out.println(cromo1.toString());
}
}