dimanche 11 septembre 2022

Is there a way to get a random key and its respective value from a TreeMap?

I want to get a random key and its respective value from a TreeMap. The idea is that a random generator would pick a key and display that value. The key is a string and the value is a double. For example myMap.put("CanSoupWt", 1.0).




Aucun commentaire:

Enregistrer un commentaire