I want to sort TreeMap by value.
The following is my
test code snippet:
The last line causes the following compile errors.
Please help to fix them.
Thanks.
Bound mismatch: The generic method sortedByValues(Map<K,V>) of type MyPanel is not applicable for the arguments (TreeMap<
String,MyString>). The inferred type MyString is not a valid substitute for the bounded parameter <V extends Comparable<? super V>> proj/client/swing MyPanel.java line 315 1310051555427 442022
Type mismatch: cannot convert from SortedSet<Map.Entry<String,MyString>> to Map<String,String> proj/client/swing MyPanel.java line 315 1310051555427 442023