If I have the following
val A = List(1,2,3)
val B = List(1,2,3)
will these two variables have the same memory address or not?
If I have the following
val A = List(1,2,3)
val B = List(1,2,3)
will these two variables have the same memory address or not?
They will not have the same memory address which can be confirmed using eq
method which compares memory references like so
A eq B // returns false