title: Design issue on static initialization block
body: <p>I have a design question: let me expalin in simple example:</p>
  
  <pre><code>Public class A()
  {
  public static HashMap map = new HashMap();
  public static String url = "default";
  static {
    getJson();
  }
  
  //url getters and setters are defined
  
  public static getJson() {
  //code which uses url to get json and populate hashmap
  }
  public string getresult(String key) {
  //uses hashmap to send result.
  }
  </code></pre>
  
  <p>I am using static initialization block because i want to get json only once.</p>
  
  <pre><code>public class B {
  </code></pre>
  
  <p>//here I want to change url and call getJson method. If i call A.setUrl() then  before setting url, A.getJson () method is called as it is in static initialization block.how can i set url first and then call getJson().</p>
  
  <pre><code>//is this a bad design?
  
  }
  </code></pre>