Tuesday, October 18, 2016

Java 8 Language Features on Android

With the help of the Jack toolchain, you’ll be able to cut out boilerplate code with the help of some Java 8 language features. Lambda expressions provide a compact way to express functional interfaces (interfaces with a single method) and method references allow you to use existing methods as lambda expressions - both features available back to API 9 (Gingerbread) devices!

Added in API 24 is the Stream API, default method implementations and static methods for interfaces, and repeatable annotations - you’ll have to be on an API 24 devices to take advantage of those features!

Check out the documentation for all the details: https://goo.gl/h3KUPP

No comments: