title: Are java global variables guaranteed to initialize first?
body: <p>Not actually global variables, but just variables that are class-wide.</p>
  
  <p>For example, I have this initialization:</p>
  
  <pre><code>MyObj obj = new MyObj();
  </code></pre>
  
  <p>And then I have this method:</p>
  
  <pre><code>public void Foo(){
      obj.doSomething;
  }
  </code></pre>
  
  <p>Let's say that I'm not able to use a constructor(this is pertaining to android). Will the variable be guaranteed to always be initialized before any methods in the class is called?</p>