There is no difference really. When you use == to compare objects, you’re comparing their memory addresses, not their values . In your example, doing b1 == b2 will return true because they are the same object.
There is no difference really. When you use == to compare objects, you’re comparing their memory addresses, not their values . In your example, doing b1 == b2 will return true because they are the same object.