I'm new to java and I'm tinkering with forEach loops.
I want to use entry.getValue() outside of the loop like this:
hashmap.entrySet().stream()
.sorted(Map.Entry<String,Double>comparingByValue())
.limit(1).forEach(entry->
{System.out.print("Worst output: " + entry.getValue() + ");}
);
....//print the one iteration of previous loop, or use entry.getValue() as var
min()method already mentioned here.