Fundamentals

Default Methods

Collections

Idioms and Techniques

Design Rationale

Advanced Questions

Why do default methods need a keyword?

It is often asked why the designers felt it necessary to distinguish default methods with a keyword, given that it can—and must—be applied only to non-abstract interface methods (and that the same keyword is already used, with a different meaning, as part of the switch statement). A minimal syntax would dispense with the keyword. This […]