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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -