title: how to fill an array of objects in kotlin?
body: <p>i get an error when i start filling my array and here the code </p>
  
  <pre><code>fun main(args :Array&lt;String&gt;){
  println(" give the size")
  var nbr=readLine()!!.toInt()
      class time(var hour:Int,var minute:Int,var seconde:Int)
  class athlete(var name:String,var nombre:Int, var result:time)
  var tab=arrayOfNulls&lt;athlete&gt;(50)
  for(i in 0 until nbr)
      println("give the name of  ${i+1} athlete")
  tab[i].name=readLine()!!
  println("give the nombre of the athelte")
  tab[i].nombre=readLine()!!.toInt() 
  println("give the hours")
   tab[i].time.hour=readLine()!!.toInt()
  println("give the minute")
  tab[i].time.minute=readLine()!!.toInt()   
  println("give the seconds")
  tab[i].time.seconde=readLine()!!.toInt()
  </code></pre>
  
  <p>the errors are in the readLine when i start filling the arrays </p>