title: Trying to create a hash table in java using string as key & double as value
body: <p>In the following program:</p>
  
  <pre><code>import java.util.*;
  
  public class HashTableStringdouble
  {
  //  private Hashtable&lt;String, double[]&gt; model  = new Hashtable&lt;String, double[]&gt;();;
      private Hashtable&lt;String, double&gt; model  = new Hashtable&lt;String, double&gt;();;                // this does not work
  
      public static void main(String args[])
      {
      }
  }
  </code></pre>
  
  <p>having double[] works but not double. It gives the following error:</p>
  
  <p><em>HashTableStringdouble.java:7: error: unexpected type
      private Hashtable model  = new Hashtable();;            // this does not work
                                ^
    required: reference
    found:    double
  HashTableStringdouble.java:7: error: unexpected type
      private Hashtable model  = new Hashtable();;            // this does not work
                                                                       ^
    required: reference
    found:    double
  2 errors</em></p>
  
  <p>I am not sure what am I doing wrong here. Please explain how does a Hashtable works.</p>