Arrays "reset"

Hi

I have been studying JAVA about half a year. This is my first time to post a question.

I am currently writing a scoreboard for a darts game. I have tried the internet and a few forums for an answer but no luck.

I need to 'reset' an array so that it is zeroed.

I read on another forum that you should re-initialise it.

Is this correct or is there a better way to do this?

I have tried to pass zero values to the method which fills the array but this has proved inadequate.

Any pointers are welcome.

Thanks Elle

[574 byte] By [Elle_Japana] at [2007-10-2 20:13:23]
# 1
The easiest way (I would think) would be to simply create a new array, as all integral elements will be initialized with a value of zero. Another option would be to use the java.util.Arrays.fill() method to fill the array with the value of your choosing.~
yawmarka at 2007-7-13 22:55:28 > top of Java-index,Java Essentials,New To Java...
# 2
Hi,re-initialising is ok and fast. Good luck!As yawmark said.Message was edited by: PhHein
PhHeina at 2007-7-13 22:55:28 > top of Java-index,Java Essentials,New To Java...
# 3
Thank you for the prompt reply I think that is what was suggested on the other forumCheers Elle
Elle_Japana at 2007-7-13 22:55:28 > top of Java-index,Java Essentials,New To Java...