Since Java 8 release interfaces can contain definitions of static and default methods. The were introduced to the Java language in order to evolve the collections library for the Streams API. Default methods are a powerful tool, however if you start using them as traits to supply your objects with some functionality orthogonal to their original purpose, things can get messy.

We’ll talk about the rules of inheritance that govern the default methods in interfaces and how one can create unpredictable type hierarchies and confusing behavior.

Read the full article on RebelLabs: