This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
2017_2018:s2:td:td_classe_code [2018/02/19 10:45] blay [Je sais passer du dessin d'une association au code] |
2017_2018:s2:td:td_classe_code [2018/02/19 10:53] blay [Je sais passer du dessin d'une association au code] |
||
---|---|---|---|
Line 214: | Line 214: | ||
//Association becomes an attribute ; multiplicity * => array or any collections | //Association becomes an attribute ; multiplicity * => array or any collections | ||
- | private Pilot[] pilots = new Pilot[0]; | + | private Pilot[] pilots; // = new Pilot[0]; //array de dimension 1 |
Line 289: | Line 289: | ||
//Get the pilots of defiance | //Get the pilots of defiance | ||
- | Pilot[] pilots = defiance.getPilots(); | + | Pilot[] ourPilots = defiance.getPilots(); |
//Print the first pilot (only object reference) | //Print the first pilot (only object reference) | ||
- | System.out.println("Pilot : " + pilots[0]); | + | System.out.println("Pilot : " + ourPilots[0]); |
} | } | ||