Unfortunately your user name does not follow our site requirements, which you can read about again
here. Please re-register with a valid name (i.e. one with a space in it). Thanks.
As for your question - ts.entrySet() returns a Set view of the mappings in ts. Each entry in this set is a Map.Entry, which is an interface. If you look at the source code of TreeMap, you will see that what it actually returns is a TreeMap.Entry, a static member class which is invisible outside the TreeMap class and implements Map.Entry. (Which is all we see of it publicly unless we look at the source code

) Anyway though, it is this class TreeMap.Entry which overrides toString() thus:
<code><pre>
public String toString() {
return key + "=" + value;
}
</pre></code>
So this is the method which gets called by your final println() statement, and puts the "=" sign in between the key and value in each Map.Entry.
As for your attempt to reverse the order of the TreeMap, you almost have it. All that is missing is that you have to tell the TreeMap to
use the new Comparator class you have created:
<code><pre> TreeMap ts = new TreeMap(new MyComp());</pre></code>
Then the output is:
<code><pre>
D=E
C=D
B=C
A=B
</pre></code>
[This message has been edited by Jim Yingst (edited December 01, 2000).]