MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

enums/menu/Meal2.java:38–46  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

36 return Enums.random(values);
37 }
38 public static void main(String[] args) {
39 for(int i = 0; i < 5; i++) {
40 for(Meal2 meal : Meal2.values()) {
41 Food food = meal.randomSelection();
42 System.out.println(food);
43 }
44 System.out.println("***");
45 }
46 }
47}
48/* Output:
49SPRING_ROLLS

Callers

nothing calls this directly

Calls 2

valuesMethod · 0.80
randomSelectionMethod · 0.45

Tested by

no test coverage detected