title: storing multiple values in a map against single key
body: <p>I have the following file named ght.txt in my c: and it contains the following data</p>
  
  <pre><code>Id|ytr|yts
  1|W|T
  2|W|T
  3|W|T
  </code></pre>
  
  <p>Now the thing is that positions of this columns (Id|ytr|yts) is also not in order means they can be reshuffled also..for ex</p>
  
  <pre><code>Id|ytr|dgfj|fhfjk|fgrt|yts
  </code></pre>
  
  <p>or they can be as ..</p>
  
  <pre><code>Id|wer|ytr|weg|yts
  </code></pre>
  
  <p>so I have done the following way and read them in java as shown below</p>
  
  <pre><code>String[] headers = firstLine.split("|");
  int id, Ix, Ixt, count = 0;
  
  for(String header : headers) {
      if(header.equals("Id")) {
          idIx = count;
      }elseif (header.equals("Ix")) {
          Ixt = count;
      } elseif (header.equals("Ixt")) {
          Ixt = count;
      }
      count++;
  }
  </code></pre>
  
  <p>Now I need to store them in a map in such a way that against id I will get the value of column ytr and yts so in map there should be single key but against that key value could be multiple please advise how to store in map in such a way</p>