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

Method main

enums/SecurityCategory.java:26–33  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

24 return Enums.random(values);
25 }
26 public static void main(String[] args) {
27 for(int i = 0; i < 10; i++) {
28 SecurityCategory category =
29 Enums.random(SecurityCategory.class);
30 System.out.println(category + ": " +
31 category.randomSelection());
32 }
33 }
34}
35/* Output:
36BOND: MUNICIPAL

Callers

nothing calls this directly

Calls 2

randomMethod · 0.95
randomSelectionMethod · 0.95

Tested by

no test coverage detected