When adding a duplicate element to a Set, the add() method returns false but does not throw an exception. Sets are designed to contain only unique elements - duplicates are simply ignored. The add() method's return value indicates whether the element was actually added (true if it was a new element, false if it was a duplicate). No compile-time or runtime error occurs.