java map to set code example Example: how to get a set from a map in java Collection theValues = map.values();