Answers for "kotlin set"

2

kotlin set

val mySet: Set<Any> = setOf(2,6,4,29,5,"Ashu","Ajay")  
    val intSet = setOf(6,4,29)  
    println(".......print Any set.........")  
    for(element in mySet){  
        println(element)  
    }  
    println("...mySet.contains\"Ashu\"...")  
    println(mySet.contains("Ashu"))  
    println("...mySet.contains(20)...")  
    println(mySet.contains(20))  
    println("...mySet.containsAll(intSet)...")  
    println(mySet.containsAll(intSet))
Posted by: Guest on September-05-2021

Code answers related to "kotlin set"

Browse Popular Code Answers by Language