title: Java HashTable Concurrency
body: <p>I have a Java code which searches for values in the hash table in following way:</p>
  
  <pre><code>class HTDemo {
      public static void main(String args[]) {
          Hashtable balance = new Hashtable();
          double bal;
          balance.put("John Doe", new Double(3434.34));
          balance.put("Tom Smith", new Double(123.22));
          balance.put("Jane Baker", new Double(1378.00));
          balance.put("Todd Hall", new Double(99.22));
          balance.put("Ralph Smith", new Double(-19.08));
  
          **System.out.println("John Doe's balance: " + balance.get("John Doe"));**
          **System.out.println("Tom Smith's balance: " + balance.get("Tom Smith"));**
          **System.out.println("Jane Baker's balance: " + balance.get("Jane Baker"));**
      }
   }
  </code></pre>
  
  <p>Now, I want to run it on multiple thread i.e. I want to modify the code in such a way thus the get methods (inside **) works concurrently. Can anybody help me how to do that. Actually, I am facing issue with passing hash tables and making it concurrent while running.</p>