Month: February 2014

Java 8 Series: Lambda Expressions

In my daily work I often switch from the development on JavaScript-based frontends to Java-based backends. Thereby it occasionally happens that I intentionally start to write function() {... at places where actually anonymous classes are required. Thanks to Java 8 such functional language syntax will be a valid option. Namely you will be able to substitute anonymous classes with lambda expressions in cases where you actually just want to pass functionality.

Read More

Java 8 Series: Default and Static Interface Methods

Currently in Java 7, if you enhance an interface with a new method declaration, or if you switch to a third-party library’s new version with an enhanced API, then this generally leads to a break of existing implementations in your code. So you must define the new method in existing implementations respectively adapt the versions of depending libraries in order to get rid of compile errors. However, in Java 8 this won’t be always necessary.

Read More