Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BruceEckel/OnJava8-Examples
/ randomSelection
Method
randomSelection
enums/menu/Meal2.java:35–37 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
33
}
34
}
35
public
Food randomSelection() {
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()) {
Callers
2
main
Method · 0.45
main
Method · 0.45
Calls
1
random
Method · 0.95
Tested by
no test coverage detected