What will be the result of comparing Lists using == function?
val a = List(1, 2, 3)
val b = List(1, 2, 3)

a == b
Explanation
Comparing the same collection type with equal elements using == results in true.
Read more: Collections equality in Scala
Source: Scala Exercises: lists

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Scala quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes