title: Memory Scope of Static Members in JAVA
body: <p>This question is regarding memory management &amp; GC in java.</p>
  
  <p>Since java does not have true static classes like C#, what is the scope of static members in a class such as below:</p>
  
  <pre><code>public class Test {
  public static String myVariable;
  }
  </code></pre>
  
  <p>Lets say Test.myVariable is set / called in another class Foo.</p>
  
  <p>Is Test.myVariable kept alive for as long as Foo is alive?</p>
  
  <p>OR </p>
  
  <p>Will Test.myVariable be kept alive for as long as the application domain is ?</p>
  
  <p>When would myVariable go out of scope ?</p>