Here is the code I have written?
Set keys = map.keySet();
SortedSet s = new TreeSet(keys);
The warning I\'m getting is:
war
As far as this problem is concerned, you should use parameterized type of keys e.g
Set keys = map.keySet();
SortedSet s = new TreeSet(keys);
where TypeOfKeyObject is object type of Key in your map object.
you may force supress the warnings (as already correctly suggested) but not advisable.
At the risk of sounding condescending, I would suggest you to study generics. A good starting point would be this: http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html