title: Adding values from a text file into a HashMap
body: <p>I need to add values from a text file with lots of data into a HashMap. This is a tiny sample from the content of the text file:</p>
  
  <p><strong>Outlook Temperature Humidity Windy GoOutside</strong><br/>
   sunny...........hot..............high..........false.....No<br/>
   overcast........hot...............high.........false......Yes<br/>       </p>
  
  <p>the "....." are spaces in the text file.</p>
  
  <p>I have stored the heading of each column in an array and I want them to be the keys in my HashMap, so for example<br/></p>
  
  <pre><code>   array[0] == "outlook" 
  </code></pre>
  
  <p>I have the following HashMap</p>
  
  <pre><code>HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  </code></pre>
  
  <p>Assuming that the program is reading the file correctly, how can I make sure that I am inserting each value into the correct key? </p>
  
  <p>Thank you for your time</p>