Created
December 28, 2015 08:26
-
-
Save not-for-me/fce2871ba1f89123a19e to your computer and use it in GitHub Desktop.
In Scala, '==' is equals with 'equals()'. Try to execute below code sniff on the repl.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Dummy(a: Int, b: Double) | |
val obj1 = Dummy(1, 10.0) | |
val obj2 = Dummy(2, 20.0) | |
val obj3 = Dummy(1, 10.0) | |
obj1 == obj2 | |
obj1 equals obj2 | |
obj1 == obj3 | |
obj1 equals obj3 | |
obj2 == obj3 | |
obj2 equals obj3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment