I have a Map<String, String>
object. I want to have it sorted by the keys, but the keys should be seen as integer. I just created an TreeMap<Integer, String>(myMapObject)
.
But this obviously does not work. How can I create a new TreeMap and change the keys from String to Integer?