The method public set<k>keyset() returns a view of the elements present in the set. Incase of removing an element from the set,keyset.remove(k) can be used.After removing the particular key the remaining elements in the set can be displayed.