title: Initialize 2D Calendar Araay in Kotlin - Dynamic size
body: <p>I building a solution to record business hours for each day in the week and add slots for each day.</p>
  <p>For eg. Sunday will start at 9.00 am and end at 9.00 pm - I will then be able to add or divide slots of 1 hour each.</p>
  <p>hence the size is dynamic and unknown. For this I created a mutable 2d array of calendar to record start and end time seperately.</p>
  <pre><code>private var availCalStart = mutableListOf&lt;MutableList&lt;Calendar&gt;&gt;()
  private var availCalEnd = mutableListOf&lt;MutableList&lt;Calendar&gt;&gt;()
  </code></pre>
  <p>But when I try to initialize a position as</p>
  <p>availCalStart = Calendar.getInstance()</p>
  <p>I get the error - out of bounds index 0 and size 0 - as the 2D array is empty...</p>
  <p>I tried to add a Calendar at position 0,0 but no syntax I try works...</p>
  <p>eg. availCalStart.add(i,{(k,cal)})</p>
  <p>any solutions to this issue please?</p>