How many objects are garbage collected?
<p>In the below example program how many object will be garbage collected before executing line Thread.sleep(1000)?</p>

<pre><code>public class GCExample {

public static void main(String[] args) throws InterruptedException {
    GCExample gc = new GCExample();
    gc.doSomeThing();
    Thread.sleep(1000);
}
public void doSomeThing(){
    Object[] obj = new Object[2];
    for(int i=0;i&lt;obj.length;i++){
        obj[i] = new Object();
    }
}
</code></pre>

<p>}</p>
