java populate set<string> code example Example: populate set in builder Set<String> h = new HashSet<>(Arrays.asList("a", "b"));