java iterate enum code example
Example 1: java iterate enum
for (EnumClass value : EnumClass.values()) {
System.out.println(value);
}
Example 2: iterate through an enum java
for (enumerator s : enumerator.values()) {
// do abc
}
Example 3: java loop through enum
for (Direction dir : Direction.values()) {
// do what you want
}