What is correct way to create an arraylist in Kotlin?

Question:What is correct way to create an arraylist in Kotlin?

1. val map = hashMapOf(1 to "one", 2 to "two", 3 to "three")

2. enum class Color {RED, GREEN, BLUE}

3. val list = arrayListOf(1, 2, 3)

4.val set = hashSetOf(1, 2, 3)


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!