title: Properties file with a list as the value for an individual key
body: <p>For my program I want to read a key from a properties file and an associated List of values for the key.<br/>
  Recently I was trying like that</p>
  
  <pre><code>public static Map&lt;String,List&lt;String&gt;&gt;categoryMap = new Hashtable&lt;String, List&lt;String&gt;&gt;();
  
  
      Properties prop = new Properties();
  
  
      try {
  
          prop2.load(new FileInputStream(/displayCategerization.properties));
          Set&lt;Object&gt; keys = prop.keySet();
          List&lt;String&gt; categoryList = new ArrayList&lt;String&gt;();
          for (Object key : keys) {
              categoryList.add((String)prop2.get(key));
              LogDisplayService.categoryMap.put((String)key,categoryList);
          }
          System.out.println(categoryList);
          System.out.println("Category Map :"+LogDisplayService.categoryMap);
  
          keys = null;
          prop = null;
  
      } catch (Throwable e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>and my properties file is like below - </p>
  
  <pre><code>A=APPLE
  A=ALPHABET
  A=ANT
  B=BAT
  B=BALL
  B=BUS
  </code></pre>
  
  <p>I want for key A there should be a list which contain <code>[APPLE, ALPHABET,ANT]</code> and B contain <code>[BAT,BALL,BUS]</code>.<BR/>
  So Map should be like this <code>{A=[APPLE, ALPHABET,ANT], B=[BAT,BALL,BUS]}</code> but I get <br/>      <code>{A=[ANT], B=[BUS]}</code><BR/>
  I searched on the internet for such a way but found nothing. I wish there should be a way.
  Any help?</p>