Java 8 primer

JAVA 8

Went digging around in Java8 and found a few interesting features which I have tried to explain below:

interface Formula {
	double calculate(int a);

	default double sqrt(int a) {
		return Math.sqrt(a);
	}
}	
(Type element) -> { body of function }
e.g: 
	Collections.sort(names, (a, b) -> {
		return b.compareTo(a);
	});
Account::addInterest
In functional programming, a monad is a structure that represents computations defined as sequence of steps. A type with a monad structure defines what it means
to chain operations, or nest functions of that type together.
- collect is a terminal function to create a collection from stream
- collect(Collector)
- boxed: function to perform autoboxing
- Collector.joining : for concatenating characters