Why I cannot invoke stream()
on the array type Enum
?
DummyEnum[] array = DummyEnum.values();
array.stream(); // Compile Error
ENUM:
public enum DummyEnum {
Hello("Hello"), Welcome("Welcome");
private String greeting;
private DummyEnum(final String greeting) {
this.greeting = greeting;
}
public String getValue() {
return greeting;
}
}