mirror of
https://gitlab.com/tutorial-java-rafa-munoz/tutorial-java-2024-25/tutorialjava2024-25.git
synced 2025-11-09 18:03:09 +01:00
feat(ch 5): examples & ex added
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user