Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
equality
:
Content language: English
Русский
What will be the result of comparing List and Set? List(1,2,3) == Set(1,2,3)
equality
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
equality
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
equality
What will be the result of comparing Maps with the same elements in different order? val myMap1 = Map("MI" -> "Michigan", "OH" -> "Ohio", "WI" -> "Wisconsin", "IA" -> "Iowa") val myMap2 = Map("WI" -> "Wisconsin", "MI" -> "Michigan", "IA" -> "Iowa", "OH" -> "Ohio") myMap1.equals(myMap2)
equality
← Prev
1
Next →
Sign Up Now
or
Subscribe for future quizzes