title: How many objects are eligible for garbage collector in this example?
body: <p>How many objects are eligible to be deallocated by garbage collector at the given point <strong>X</strong>? </p>
  
  <p>I'm somewhat confused with static and how it actually works with garbage collector. Could you explain me?</p>
  
  <pre><code>public class Star {
      static String nearbyPlanet = new String();
      String nome = new String();
  
      static void makeStar(String planet) {
          Star s = new Star();
          s.nearbyPlanet = planet;
      }
  
      public static void main(String[] arg) {
          Star.makeStar("Mars");
          Star.makeStar("Venus"); /* X -- HERE!! -- */
          Star.makeStar("Krypton");
      }
  }
  </code></pre>