import java.util.*; class Test { boolean test(Set set) { return set.add("foo"); } void use() { Set set = new HashSet<>(); test(set); test(set); } }