How to add an element to an array without a modification of the old array or creation a new one?
- by Roman
I have the following construction: for (String playerName: players).
I would like to make a loop over all players plus one more special player. But I do not want to modify the players array by adding a new element to it. So, what can I do?
Can I replace players in the for (String playerName: players) by something containing all elements of the players plus one more element?