Daniel Ungerfält wrote:
It only returns the adress and not the names I put in like this: [Player@29edc073, Player@37f5d386, Player@6c121f1d, Player@19b8e059, Player@38910040].
I don't see any code that prints out the array list -- but based on the output, you probably just did a print() of the list object, which of course, will traverse the elements and use the toString() method. Did you correctly override the toString() method?
Daniel Ungerfält wrote:
And the for-lop to give every player dices just crashes(indexoutofbounds). So how do I have to approach this to get it right?
You didn't actually create any dice. You created an array list to hold the dice objects, and then you traversed the empty list trying to configure the non-existent dice.
Henry