title: Iterating through hashtable and using the get and containsKey methods
body: <p>Having trouble with the containsKey and get method, also not sure how to iterate through the hashtable keys and values, I want to iterate through and add the keys with the value of true to the solution list </p>
  
  <p>1st error: The method containsKey(int) is undefined for the type hashTable</p>
  
  <p>2nd error: Can only iterate over an array or an instance of java.lang.Iterable</p>
  
  <p>3rd error: The method get(int) is undefined for the type hashTable        </p>
  
  <pre><code>  package practice;
  
          import java.util.*;
          /*
  
          You are given an integer array, where all numbers except for TWO numbers appear even number of times. 
  
          Q: Find out the two numbers which appear odd number of times.
  
          */
  
          public class hashTable{
          public static void main(String[] args){
              int[] test = {2, 2, 5, 7, 4, 4};
              List&lt;Integer&gt; solution = new ArrayList&lt;Integer&gt;();
              Hashtable&lt;Integer, Boolean&gt; ht = new Hashtable&lt;Integer, Boolean&gt;(); 
              Boolean check = true;
              for (int item : test){
  //error             if (!containsKey(item)){
                      check = true;
                  } else{
                      check = false;
                      ht.put(item, check);
  
                  }
                  }
  
  //error            for (int item : ht){
  //error             if (get(item) == true){
                      solution.add(item);
                  }
                  }
              System.out.println("the result is");
              System.out.println(solution);
              }
  
           }
  </code></pre>