Convert java.util.Date to java.time.LocalDate

What is the best way to convert a java.util.Date object to the new JDK 8/JSR-310 java.time.LocalDate? Date input = new Date(); LocalDate date = ???

Java 8: Where is TriFunction (and kin) in java.util.function? Or what is the alternative?

I see java.util.function.BiFunction, so I can do this: BiFunction f = (x, y) -> { return 0; }; What if that is not good enough and I need TriFunction? It doesn’t …

Java 8 Iterable.forEach() vs foreach loop

Which of the following is better practice in Java 8? Java 8: joins.forEach(join -> mIrc.join(mSession, join)); Java 7: for (String join : joins) { mIrc.join(mSession, join); } I have lots …

Monads with Java 8

In the interests of helping to understand what a monad is, can someone provide an example using java ? Are they possible ? Lambda expressions are possible using java if you download the pre-release …