// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.HashSet;
import java.util.Set;

public class SetFun {
    public static void main(String[] args) {
        Set<Integer> s1 = Set.of(1, 2, 3);
        //s1.add(4);
        Set<Integer> s2 = new HashSet<Integer>(s1);
        s2.add(4);
    }
}
