What's the difference between == and .equals in Scala?

前端 未结 5 1774
小鲜肉
小鲜肉 2020-11-28 02:28

What is the difference between == and .equals() in Scala, and when to use which?

Is the implementation same as in Java?

EDIT: The r

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 03:12

    In Scala == first check for Null values and then calls equals method on first object

提交回复
热议问题