About Question enthuware.ocpjp.v11.2.3065 :
Posted: Tue Mar 30, 2021 9:03 am
1. orig == dup will be false because dup is a clone of orig and therefore, they will point to two different array objects. Their elements, however, will point to the same objects.
3.orig[0] == dup[0] will be true because, as explained above, a clone creates a shallow copy, which means, elements of orig and dup point to the same objects.
Hi everyone, I don't understand, why (orig == dup) => false but (orig[0] == dup[0] ) => true .
In the 1 example is described what both are two different array objects. Then, is False. But in the 3 example is True :/
3.orig[0] == dup[0] will be true because, as explained above, a clone creates a shallow copy, which means, elements of orig and dup point to the same objects.
Hi everyone, I don't understand, why (orig == dup) => false but (orig[0] == dup[0] ) => true .
In the 1 example is described what both are two different array objects. Then, is False. But in the 3 example is True :/