Answer the question
In order to leave comments, you need to log in
No pip.py file?
Can someone throw pip.py? I don't know how, but when I checked the folders, I found that it wasn't there. Didn't find anything on the Internet. I've probably already tried everything that came to your mind and I think it's better to just drop the desired file into the desired directory.
Answer the question
In order to leave comments, you need to log in
Inherit from the Comparable interface or the Comparator class and follow the tutorial - https://beginnersbook.com/2013/12/how-to-sort-hash...
Fundamentally wrong! Do not use! Thanks to Ivan Sokolov for the nose poke.
HashMap<String,SomeClass> someHashMap= ...;
Collections.sort(someHashMap, new Comparator<SomeClass>() {
public int compare(SomeClass o1, SomeClass o2) {
//return a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
}
});
You can use the Comparable interface or the Comparator class in java.
For more information on hashmap you can refer below links
https://docs.oracle.com/javase/7/docs/api/java/uti...
https://www.flowerbrackets.com/sorting-hashmap-by- ...
https://www.flowerbrackets.com/comparable-interfac...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question