Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
collection
:
Мова контенту: English
Русский
What will be the result of comparing collections? mutable.Seq(1,2,3) == immutable.Seq(1,2,3)
collection
What will be the result of comparing List and Set? List(1,2,3) == Set(1,2,3)
collection
What will be the result of comparing List with Vector, HashSet with TreeSet? List(1, 2, 3) == Vector(1, 2, 3) // 1 HashSet(1, 2) == TreeSet(2, 1) // 2
collection
What will be the result of comparing empty lists (Nil)? val a: List[String] = Nil val b: List[Int] = Nil a == Nil // 1 a eq Nil // 2 b == Nil // 3 b eq Nil // 4 a == b // 5 a eq b // 6
collection
What will be the Map size in the following code? val myMap = Map("MI" -> "Michigan", "OH" -> "Ohio", "WI" -> "Wisconsin", "MI" -> "Michigan") myMap.size
collection
What will be the result of following code execution? val myMap = Map("MI" -> "Michigan", "OH" -> "Ohio", "WI" -> "Wisconsin", "MI" -> "Meechigan") myMap("MI")
collection
Is it allowed to have map with keys of different types? val myMap = Map("Ann Arbor" -> "MI", 49931 -> "MI")
collection
What will be the result of comparing maps where from one of map a nonexistent element is removed? val myMap = Map("MI" -> "Michigan", "OH" -> "Ohio", "WI" -> "Wisconsin", "IA" -> "Iowa") val aNewMap = myMap - "MN" aNewMap.equals(myMap)
collection
← Попередня
1
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести