title: Add empty List to map
body: <p>I am getting NullPointerException in the following code : </p>
  
  <pre><code>private Map&lt;String,List&lt;Entry&gt;&gt; Days;
  private void intializeDays() {
      //Iterate over the DayOfWeek enum and put the keys in Map
      for(DayOfWeek dw : EnumSet.range(DayOfWeek.MONDAY,DayOfWeek.SUNDAY)){
      List&lt;Entry&gt; entries = null;
      Days.put(dw.toString().toLowerCase(),entries);
      }
  }
  </code></pre>
  
  <p>I think its because of</p>
  
  <pre><code>List&lt;Entry&gt; entries = null;
  </code></pre>
  
  <p>but then how do I create an empty list and add it to a map ?</p>