title: 'Var' must be initialized Kotlin
body: <p>Some of you can help me with this little problem? I'm very new to Kotlin and Android development! I don't understand why this snippet of code returns me the following error:</p>
  
  <pre><code>class Catalog {
  var musicList: List&lt;Music&gt; = ArrayList()
  }
  
  class Music{
      var id: String = ""
  }
  
  fun main(args: Array&lt;String&gt;) {  
      var test: Catalog
      test.musicList[0] = "1"  
  }
  </code></pre>
  
  <p>ERROR:</p>
  
  <pre><code>Variable 'test' must be initialized
  </code></pre>
  
  <p>What is wrong? 
  Thank you all!</p>