Create a class called Same
with a single class method orDifferent
.
orDifferent
accepts an array of Object
values and returns true
if all the references refer to the same
object, and false
otherwise.
If the passed array is null
or empty you should return false
.
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: