Robert

47%
Flag icon
Item 34 says that enum instance fields are preferable to constant-specific class bodies. Lambdas make it easy to implement constant-specific behavior using the former instead of the latter.
Robert
To be fair, you could have done this without lambdas, too, by passing the operation code as an anonymous function as a constructor arg.
Effective Java
Rate this book
Clear rating
Open Preview