title: How to initialize an empty ArrayList in Kotlin?
body: <p>I have an empty arraylist:</p>
  <pre><code>var mylist: ArrayList&lt;Int&gt; = ArrayList()
  </code></pre>
  <p>When I want to set value in it I got this error:</p>
  <pre><code>java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
  </code></pre>
  <p>The question is: How can I initialize my list?</p>