As we know two Set instances are equal iff they contain the same elements, BUT is it possible to have the same element in two different sets (Set interface can not contain duplicate element)?
As we know two Set instances are equal iff they contain the same elements
Share
Distinct sets have no affect on one another. Set A can contain ‘123456’, and Set B can also contain ‘123456’ – the prohibition on duplicates is for a single instance, not across instances.
Equality for two sets implies that their contents are identical.