The Nexus 6P, pictured above, will be one of the first devices to run Android N, the recently-announced new version of Android that is available right now as a Developer preview for Nexus 6P users and other Nexus owners. Android N will be launching with new features such as multi-window and a revamp of notifications in the notification shade, but under-the-hood there are some more interesting changes going on. Namely the change from Java 7 to Java 8. This brings a whole lot more to the table where Java developers are concerned, and marks a big update to the foundation that Android and many of its apps are built upon.
Android 5.0 Lollipop was one of the first versions of Android that launched requiring apps be built using Java 7, and now Android N is updating things to Java 8. For the most part, this sort of talk is only going to apply to developers, but it's good to see Android get that little bit more modern in the process of upgrading to N. The Jack Compiler, a developer tool available from Google that stands for "Java Android Compiler Kit" has been updated for support for Java 8 and with that comes more instructions and cleaner code overall. One of the notable inclusions in Java 8 is the support for Lambda Expressions. These allow for cleaner syntax and functional programming, it basically lets developers create something fairly complex, but keep the syntax clean and less bloated. There's lots of information for developers that aren't familiar with Lambda Expressions out there, including much of it from Google themselves.
The exciting thing here is that Lambda Expressions will work on versions of Android back to versions 2.3, Gingerbread which launched with the Nexus S. This makes it worth it for a developer to get familiar with the new Java 8 support in Android as it will be leveraged by lots of different users out there, not just those running Android N. Sadly though, the same can't be said for new features like functional interfaces, default and static methods or streams. These new inclusions will only work on devices running Android N, which makes it much less likely for the majority of users to feel the benefit they might bring to the table.
The adoption of Java 8 is a big deal for Android on the whole, and will no doubt make it easier for developers to create new apps and clean up existing code. That's what Java 8 is all about, creating cleaner code and streamlining the whole process, and the Jack compiler is now geared up to better adapt to programming language updates like this one. Developers will need to set up a new environment to use Java 8, but for the most part it's basically installing and setting up JRE 8 and JDK 8 and then updating their Android SDK, as always there's lots of info available from Google, too.