i have the right solution but i would like to know it.
One little Question .can i Pick the String Name variable because it is puplic?
In der Diskussion
Kommentare (3)
- Beliebt
- Neu
- Alt
Du musst angemeldet sein, um einen Kommentar schreiben zu können
furius72
6 Oktober 2022, 17:56
you have to create four object "zerg"(zerg1, zerg2 ...) and name it (zerg1.name, zerg2.name...) etc....
0
Gellert Varga
28 Juli 2022, 15:51
The version below also works, although here the String Name variables are private.
However, this is only because the Zerg, Protoss and Terran classes are inside the Solution class.
Normally, if they were separate classes, as below, it would not be possible to use the private variable of the Zerg class from the Solution class in this way:
0
Gellert Varga
28 Juli 2022, 15:53
But if the variables are public in these separate classes, you can access/use them directly from the Solution class:
0