ArrayList() vs arrayListOf()

前端 未结 5 1288
无人共我
无人共我 2021-01-20 01:10

I was going through some Kotlin basics and found two syntaxes.

ArrayList()

And

arrayListOf()
         


        
5条回答
  •  [愿得一人]
    2021-01-20 01:31

    arrayListOf is a function, that has optional variable length arguments

    In case of using it without arguments, there is no difference

提交回复
热议问题