enum forloop java code example
Example 1: iterate through an enum java
for (enumerator s : enumerator.values()) {
// do abc
}
Example 2: java loop through enum
for (Direction dir : Direction.values()) {
// do what you want
}
for (enumerator s : enumerator.values()) {
// do abc
}
for (Direction dir : Direction.values()) {
// do what you want
}