Sam
09/10/2019, 8:49 AMarrayListOf as parameter , only ArrayList can accept to use as parameter
1. class CategoriesViewHolder(context: Context,categories:ArrayList<Category>){}
2. val categories = arrayListOf<String>()
Thanksgergo
09/10/2019, 8:58 AMfun foo(bar: ArrayList<Int> = arrayListOf()){}Sam
09/10/2019, 8:59 AMgergo
09/10/2019, 8:59 AMgergo
09/10/2019, 9:00 AMgergo
09/10/2019, 9:02 AMgergo
09/10/2019, 9:02 AMwasyl
09/10/2019, 9:03 AMlistOf<X> and List<X>. Also the same difference as Java’s List<X> and ArrayList<X>() - the type and the constructorSam
09/10/2019, 9:44 AM