title: Java get() changes initialized Hashtable keys to Null
body: <p>I'm currently having a problem with the get() method used with hashtables.</p>
  
  <p>My initialization code:</p>
  
  <pre><code>        Hashtable&lt;Integer, pageEntry&gt; pageTable = new Hashtable&lt;Integer, pageEntry&gt;();
          Hashtable&lt;Integer, LinkedList&lt;Integer&gt;&gt; lookAhead = new Hashtable&lt;Integer, LinkedList&lt;Integer&gt;();
  
          //Initialize pageTable and co.
          for(int i = 0; i &lt; 10; i++) {
              pageEntry p = new pageEntry();
              pageTable.put(i, p);
              lookAhead.put(i, new LinkedList&lt;Integer&gt;());
          }
  </code></pre>
  
  <p>when I use <code>System.out.println(lookAhead);</code>, the output is as follows:</p>
  
  <pre><code>{0=[]}
  {1=[], 0=[]}
  {2=[], 1=[], 0=[]}
  {3=[], 2=[], 1=[], 0=[]}
  {4=[], 3=[], 2=[], 1=[], 0=[]}
  </code></pre>
  
  <p>If I use <code>System.out.println(lookAhead.get(0))</code>, the output is as follows</p>
  
  <pre><code>[]
  []
  []
  []
  []
  </code></pre>
  
  <p>However, if I use <code>System.out.println(lookAhead.get(3))</code>, the output changes to</p>
  
  <pre><code>null
  null
  null
  []
  []
  </code></pre>
  
  <p>Is there some reason I'm overlooking as to why it changes my values to null?</p>
  
  <p>Thanks for your time.</p>