SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public String getHealthiestSalad() {
  2.         int calories = Integer.MAX_VALUE;
  3.         String healthiestSalad = "";
  4.         for (Map.Entry<String, Salad> salad : data.entrySet()) {
  5.             if (calories > salad.getValue().getTotalCalories()) {
  6.                 calories = salad.getValue().getTotalCalories();
  7.                 healthiestSalad = salad.getKey();
  8.             }
  9.         }
  10.         return healthiestSalad;
  11.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top