I have a Java HashMap with String keys and Integer values. I need to produce a string which has the keys in the same order as their corresponding values sorted by numerically descending order. What are my options?

your options are to not use a HashMap. HashMap is not sorted.
You may try a TreeMap, but that's sorted on key only.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.