public static void main(String[] args) {
HashMap<String, Integer> pro=new HashMap();
Pair<String,Integer> highproduct = new Pair<>("",0);
int maxValueInMap=(Collections.max(pro.values()));
for (Entry<String, Integer> entry : pro.entrySet()) { // Itrate through hashmap
if (entry.getValue()==maxValueInMap) {
System.out.println(entry.getKey()); // Print the key with max value
// highproduct
// =<entry.getValue(),entry.getKey()>;
highproduct = new Pair<>(entry.getKey(),entry.getValue());
}
}
}
}`
this is the code that mention to you
this is correct but not work in the spring boot
@gehadadel
`public class Tessssst {
}`
this is the code that mention to you this is correct but not work in the spring boot