title: Is object garbage collected when removed from a static Map?
body: <p>I have a static map in my application which populates when I click on a link.
  After that it makes lots of objects and store them. Now I have a link which will clear this Map.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>Hello1 hello1 = new Hello1();
  hello1.setHello("Helllollo1");
  Hello hello = new Hello();
  hello.setHello1(hello1);
  hello.setHello("Hellollo");
  setMap("1", (Object)hello);
  
  Hello1 hello2 = new Hello1();
  hello2.setHello("Helllollo1");
  Hello helo = new Hello();
  helo.setHello1(hello2);
  helo.setHello("Hellollo");
  setMap("2", (Object)helo);
  
  Hello1 hello3 = new Hello1();
  hello2.setHello("Helllollo1");
  Hello helo1 = new Hello();
  helo1.setHello1(hello3);
  helo1.setHello("Hellollo");
  setMap("3", (Object)helo1); 
  </code></pre>
  
  <p>Now I have a method removeMap which works as below</p>
  
  <pre><code>public static void removeMap(String key){
  
          if(map.containsKey(key)){
  
              map.remove(key);
          }   
      }
  </code></pre>
  
  <p>So when I call this method for a single key after adding above three object, is that object Garbage Collected or not?</p>