Originally posted by Ernest Friedman-Hill:
[code]
public int compare(Object o1, Object o2) {
Float f1 = (Float)((Map.Entry)o1).getValue();
Float f2 = (Float)((Map.Entry)o1).getValue();
typo! **********************************^^
return f1.compareTo(f2);
}
[code]
Cut and paste error -- you're comparing o1 to o1, not to o2!
huh, i spent the afternoon learning how to do this and eventually end up making such silly mistakes. thanx a lot anyways, shud have been more careful.it works now.
shankar