Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How can I return all variable values to their original values in Ready to Program with Java?

To clarify, I have about 25 variables that when I declared them, I set a value to them. These values change as my program runs. My program is pretty much Deal or No Deal so after the game is over, I ask the user if they want to play again without having to close the program and re-open it. If they want to play again, how can I get all 25 variables to return to their initial values?

1 Answer

Relevance
  • 7 years ago
    Favorite Answer

    Define a method

    intitalize()

    that sets all variables to whatever value you want...

Still have questions? Get your answers by asking now.