Home United States USA — software SKP's Java/JEE Gotchas: Revisiting Java SE 8 Features! SKP's Java/JEE Gotchas: Revisiting...

SKP's Java/JEE Gotchas: Revisiting Java SE 8 Features! SKP's Java/JEE Gotchas: Revisiting Java SE 8 Features!

200
0
SHARE

With Java 9 drawing near, revisit Java 8’s highlights, such as lambda expressions, method references, repeating annotations, and parallel array operations.
Prepring for an interview? Want to just revisit Java SE 8 features? Trying to recollect or revise a Java SE programming construct? Let me take you back in time to what was introduced first in Java SE 8? Join me for this tutorial series on Java as we all eagerly await the official release of Java SE 9!
Lambda expressions
Parallel array operations
Method parameter reflection
Repeating annotations
Method references
I have provided some of the most important core language enhancements for JDK 8.0, along with code samples. The examples provided below can be directly pasted into your IDE, and you may name the class as provided.
Another nice feature, particularly useful when you are using reflection and debugging large amounts of code, is additional introspection on the real parameter names. By compiling the code with JDK 8 using the following command, we enable this feature. Note that it will lead to the use of additional memory/bytecode size.
The following method illustrates the use of method parameter reflection in a Java program.
Note the usage below of method references. There can be four types of references to methods, including:
Happy JDK 8ing!
Java SE 5
Java SE 6
Java SE 7

Continue reading...