title: How to call static block of class in java
body: <p>I have class which has static block as follows:</p>
  
  <pre><code>public class DataProvider {
  static int a;
  static String b;
  
  static {
      a = readRollConfiguration();
      b = readNameConfiguration();
  }
  
  
  public static int getRoll() {
      return a;
  }
  }
  </code></pre>
  
  <p>I change configuration and call methods of this class then i get older values of <strong>a</strong> and <strong>b</strong>, until app is killed and restart.</p>
  
  <p>So is there any way to call static block so that <strong>a</strong> and <strong>b</strong> get updated?</p>