title: Hash table Java insert
body: <p>I am new to Java and I am trying to learn about hash tables. I want to insert objects into my hash table and then be able to print all the objects from the hash table at the end. I am not sure I am doing doing this right because I have read that I need to override the get() method or hashCode() method but I am not sure why.</p>
  
  <p>I am passing in String objects of student names. When I run the debugger after my inserts, it shows the key as "null" and the indexes of my inserts are at random places in the hash table. Ex. 1, 6, 10</p>
  
  <p>This is how I have been adding. Can anyone tell me if this is correct and do I actually need to override things?</p>
  
  <p>Thanks in advance!</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code> Hashtable&lt;String,String&gt; hashTable=new Hashtable&lt;String,String&gt;();
   hashTable.put("Donald", "Trump");
   hashTable.put("Mike", "Myers");
   hashTable.put ("Jimmer", "Markus");
  </code></pre>