Submitted by heartin on Mon, 07/04/2016 - 00:26
Streams are an important introduction in Java 8 and follows the pipeline model and lazy initialization. It also enables out of the box parallelization support. We will also see Java 8 collection improvements.
Submitted by heartin on Mon, 06/13/2016 - 21:25
Java 8 allows you to write lambda expressions in few varying syntaxes. Let us quickly see those here.
With no arguments
Runnable r = () -> System.out.println(“H”);
Only one argument: with or without parenthesis
ActionListener al1 = (event) -> System.out.println(“Button clicked”);
ActionListener al2 = event -> System.out.println(“Button clicked”);
Submitted by heartin on Mon, 06/13/2016 - 12:08
In functional programming, we think in terms of functions. While Object Oriented programming abstract over data, functional programming abstract over behavior. Instead of data, stateless functions are be passed across the code.
Lambda expressions are Java's way of doing functional programming. Lambda expressions in computer science are anonymous functions: a function (or a subroutine) defined, and possibly called, without being bound to an identifier.
Submitted by heartin on Sun, 05/01/2016 - 00:57
Let us get started with all new Java 8 features with simple examples and less theory. In this book we will not go deep into any of the topics, but will try to touch upon most important features with simple examples and hands on exercises. This book also assumes that you are familiar with all the topics mentioned in the Beginning Java Book.