title: Java Array containing reference to object
body: <p>I have object e of class EMP. I add it to array and make the reference of e as null.</p>
  
  <pre><code>Emp e = new Emp();
  Emp[] lst = new Emp[10];
  lst[0] = e;
  e = null; 
  System.out.println("Emp object = "+l[0]);
  </code></pre>
  
  <p>What I know is array lst doesn't contain the actual empolyee object but reference to employee object.  So If I make the reference e as null then how are we still able to access the object using lst[0].</p>