Miscellaneous Java8 and Less Noticed Old Features
- Oracle.com, Security Enhancements in Java8
1 Anonymous Classes
2 Delegates
- Java does not have the delegate keyword (unlike C#). But the idea can be implemented.
- https://en.wikipedia.org/wiki/Delegation_pattern
3 Interfaces with Methods
- Virtual Extension Methods
- Previously called: default methods, or defender methods.
- Similar but not as powerful as Scala traits.
- Interfaces can now define static methods:
default
methods - http://www.lambdafaq.org/what-are-default-methods/