java - Unable to sort treemap by key of type float in descending order -
// should return map sorted in descending order according key public map<float, string> getsomething() { map<float,string> x =new treemap(collections.reverseorder()); x.put(float.valueof("5.0"),"string1"); x.put(float.valueof("9.0"),"string2"); x.put(float.valueof("1.0"),"string3"); return x; }
Comments
Post a Comment