At Data Geekery, we love Java. And as we’re really into jOOQ’s fluent API and query DSL, we’re absolutely thrilled about what Java 8 will bring to our ecosystem.
Every Friday, we’re showing you a couple of nice new tutorial-style Java 8 features, which take advantage of lambda expressions, method references, default methods, the Streams API, and other great stuff. You’ll find the source code on GitHub.
The Best Java 8 Resources – Your Weekend is Booked
We’re obviously not the only ones writing about Java 8. Ever since this great language update’s go live, there had been blogs all around the world appearing with great content and different perspectives on the subject. In this edition of the Java 8 Friday series, we’d like to summarise some of the best content that has been going on on that subject.
1. Brian Goetz’s Answers on Stack Overflow
Brian Goetz was the spec lead for JSR 335. Together with his Expert Group team, he has worked very hard to help Java 8 succeed. However, now that JSR 335 has shipped, his work is far from being over. Brian has had the courtesy of giving authoritative answers to questions from the Java community on Stack Overflow. Here are some of the most interesting questions:
- What is the reason why “synchronized” is not allowed in Java 8 interface methods? – Answer
- Why is “final” not allowed in Java 8 interface methods? – Answer
- Is “Java Concurrency In Practice” still valid? – Answer
- How to correctly determine that an object is a lambda? – Answer
- Why does Iterable not provide stream() and parallelStream() methods? – Answer
- Using a semaphore inside a nested Java 8 parallel stream action may DEADLOCK. Is this a bug? – Answer
- Java8: Why is it forbidden to define a default method for a method from java.lang.Object – Answer
- Is there a way to compare closures? – Answer
- Java 8 streams serial vs parallel performance – Answer
- Convert Iterable to Stream using Java 8 JDK – Answer
Thumbs up to this great community effort. It cannot get any better than hearing authoritative answers from the spec lead himself.
2. Baeldung.com’s Collection of Java 8 Resources
This list of resources wouldn’t be complete without the very useful list of Java 8 resources (mostly authoritative links to specifications) from the guys over at Baeldung.com. Here is:
3. The jOOQ Blog’s Java 8 Friday Series
Yay, that’s us! :-)
Yes, we’ve worked hard to bring you the latest from our experience when integrating jOOQ with Java 8. Here are some of our most popular articles from the recent months:
- 10 Subtle Mistakes When Using the Streams API
- JavaScript goes SQL with Nashorn and jOOQ
- Language Design is Subtle
- No More Need for ORMs
- Let’s Deprecate Those Legacy Libs
- Lean Concurrency
- Map Enhancements
- SQL ResultSet Streams
- A Lesser-Known Java 8 Feature: Generalized Target-Type Inference
- Does Java 8 Still Need LINQ? Or is it Better than LINQ?
4. ZeroTurnaround’s RebelLabs Blog
As part of the ZeroTurnaround content marketing strategy, ZeroTurnaround has launched RebelLabs quite a while ago where various writers publish interesting articles around the topic of Java, which aren’t necessarily related to JRebel and other ZT products. There is some great Java 8 related content having been published over there. Here are our favourite gems:
- How your addiction to Java 8 default methods may make pandas sad and your teammates angry!
- Is Java 8 the fastest JVM ever? Performance benchmarking of Fork-Join
- How to avoid ruining your world with lambdas in Java 8
- Monadic futures in Java 8: How to organize your data flow and avoid callback hell
- How your addiction to Java 8 default methods may make pandas sad and your teammates angry!
5. The Takipi Blog
Just like ZeroTurnaround and ourselves, our friends over at Takipi provide you with some awesome Java 8 content on their blog.
- Java 8 StampedLocks vs. ReadWriteLocks and Synchronized
- 10 Features in Java 8 You Haven’t Heard Of
- 15 Must Read Java 8 Tutorials
- New Parallelism APIs in Java 8: Behind The Glitz and Glamour
- The Dark Side Of Lambda Expressions in Java 8
6. Benji Weber’s Fun Experiments with Java 8
This blog series we found particularly fun to read. Benji Weber really thinks outside of the box and does some crazy things with default methods, method references and all that. Things that Java developers could only dream of, so far. Here are:
- JSON to Java Interfaces with Nashorn
- Pattern Matching in Java
- Java Value Objects
- Java Forwarding-Interface Pattern
- Joins in pure-java database queries
- Checked Exceptions and Streams
- Typesafe database interaction with Java 8
7. The Geeks from Paradise Blog’s Java 8 Musings
Edwin Dalorzo from Informatech has been treating us with a variety of well-founded comparisons between Java 8 and .NET. This is particularly interesting when comparing Streams with LINQ. Here are some of his best writings:
- Why There Is Interface Pollution in Java 8
- Memoized Fibonacci Numbers with Java 8
- Java 8 Optional Objects
- Java Streams API Preview
- Java Streams Preview vs .Net High-Order Programming with LINQ
Is this list complete?
No, it is missing many other, very interesting blog series. Do you have a series to share? We’re more than happy to update this post, just let us know (in the comments section)
Every day interesting Java questions here: https://twitter.com/StackJava
Thanks for sharing. Yes, Stack Overflow is an interesting source for Java-related topics.
In my list of resources I also have the following:
State of Lambda (By Brian Goetz)
http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-final.html
State of Lambda – Libraries Edition (By Brian Goetz)
http://cr.openjdk.java.net/~briangoetz/lambda/lambda-libraries-final.html
Translation of Lambda Expressions (By Brian Goetz)
http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html
From Lambdas to Bytecode (By Brian Goetz)
http://medianetwork.oracle.com/video/player/1113272510001
Java 8 Launch
http://www.oracle.com/events/us/en/java8/index.html
Maurice Naftalin’s FAQ About Java Lambda
http://www.lambdafaq.org/
And this is also another interesting, very exhaustive collection of other valuable links (By Baeldung).
http://www.baeldung.com/java8
Awesome collection, Edwin. Yes, the state of the lambda series and related documents are a must-read overview over what has been added to Java 8. Note that the Baeldung blog was already on the list :)