Enable Java 8 features in Android with these libraries

Since Android N, some of the Java 8 language features are finally supported thanks to the new Jack & Jill compiler toolchain. This however comes with several limitations like for example an inability to use the new compiler along with the data binding support library or limited annotations support. But that doesn’t mean that you should give up on advanced language features of Java 8 at all. In this post, I’ll introduce you to a way how to enable Java 8 features in Android by using four libraries back-porting Java 8 functionality to lower Java versions.

Read more

New Date and Time API in Java 8

Handling time and date in Java has always been somewhat complicated. At least until the new Date and Time API was published along with Java 8 release. Before that, developers had to struggle with not so great java.util.Date and java.util.Calendar classes which both had their flaws. In this post, a third in a series introducing new Java 8 language features (see Java 8 Stream API and Lambda expressions tutorial posts), I’m going to present the new Date and Time API in Java 8 and explain why it’s a much better choice than previous date and time APIs.

Read more