Category Java

Java 8: New Date and Time API

With Java < 8, you would need to write something like: Calendar cal = Calendar.getInstance();cal.set(Calendar.HOUR, cal.get(Calendar.HOUR) + 2);vs. with Java 8: Readability: Calendar.getInstance() is not very well named: it is hard to tell which instance you are getting without reading…

Java Lambda Expressions

This post explores Oracle’s Java 8 specification for lambda expression , the syntax and use cases. Lambda expressions can be used as method arguments or to iterate, filter, and extract data from a collection.