title: Reset each variable in java
body: <p>Is there a way to reset a value of a static variable to their initial state? For example:</p>
  
  <p>I have a lot of variables which holds score, speed, etc. All those variables are changing during the program execution. So when the user fails in a game, I would like to reset ALL variables to their initial state. Is there some way? Because i don't know if it is a good idea to do this manually for EACH variable in my program. for example:</p>
  
  <pre><code>static int SCORE = 0;
  static float SPEED = 2.3f;
  
  
  
  public void resetGame() {
  
  SCORE = 0;
  SPEED = 2.3;
  
  }
  </code></pre>