title: Why is this Java static field null?
body: <pre><code>public class StaticTest {
  
      private static String a;
      private static String b = "this is " + a;
  
      public static void main(String[] args) {
          a = "test";
  
          System.out.println(b); // prints "this is null"
      }
  
  }
  </code></pre>
  
  <p>I'm confused about <code>b</code>'s value. I think the result should be "this is test", but the result is "this is null". Why?</p>