Skip to main content

Posts

Showing posts with the label All Collection Type Details in Kotlin
 All Collection Type Details  in Kotlin fun main ( args: Array<String> ) { /* collectin of Two Types 1.immutable (immutable means : Collection only Read) 2.Mutable (Mutable means : Collection Read and Write) */ /* 1.immutable collection: 1.listof 2.mapof 3.setof */ val idlistof = listOf <Int> ( 1 , 1 , 1 , 1 ) val idlistof_without_type = listOf ( 1 , 1 , 1 , 1 ) val idmapof = mapOf <String, String> ( "1" to "ruhul" , "2" to "amin" ) val idmapof_without_type = mapOf ( "1" to "ruhul" , "2" to "amin" ) val idmapof_defrentdata_without_type = mapOf ( "1" to "ruhul" , 2 to "amin" ) val setof = setOf <String> ( "Asia" , "Urop" ) val idsetof_without_type = setOf ( "Asia" , "Urop" ) /* 1.mutable collection: 1.mutable list 1....