Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BruceEckel/OnJava8-Examples
/ main
Method
main
housekeeping/EnumOrder.java:7–11 ·
view source on GitHub ↗
(String[] args)
Source
from the content-addressed store, hash-verified
5
6
public
class
EnumOrder {
7
public
static
void
main(String[] args) {
8
for
(Spiciness s : Spiciness.values())
9
System.out.println(
10
s +
", ordinal "
+ s.ordinal());
11
}
12
}
13
/* Output:
14
NOT, ordinal 0
Callers
nothing calls this directly
Calls
1
values
Method · 0.80
Tested by
no test coverage detected