Core Java
-
Java 11: Converting a Collection to an Array
In Java 11, a new default method, toArray(IntFunction), has been added to the java.util.Collection interface, which allows the collection’s elements…
Read More » -
Parsing Value from StreamCorruptedException: invalid stream header Message
It is a relatively common occurrence to see StreamCorruptedExceptions thrown with a “reason” that states, “invalid stream header” and then…
Read More » -
Restarting Java’s Raw String Literals Discussion
It was announced in December 2018 that raw string literals would be dropped from JDK 12. Now, in the new year, discussion related…
Read More » -
Compact Number Formatting Comes to JDK 12
JDK 12 Early Access Build 24 introduces support for Compact Number Formatting. The JDK-8188147 (Compact Number Formatting support) CSR‘s “Summary” is the simple…
Read More » -
Java 11: Running single-file programs and “shebang” scripts
In Java 11, the java launcher has been enhanced to run single-file source code programs directly, without having to compile…
Read More » -
A brief overview of the Fork/Join Framework in Java
Introduction The Fork/Join framework is a framework to solve a problem using a concurrent divide-and-conquer approach. They were introduced to…
Read More » -
The Brief but Complicated History of JDK 12’s String::transform Method
It was recently proposed that the Java preview feature Raw String Literals (JEP 326) be removed from JDK 12 and…
Read More » -
Java: Streaming a JDBC ResultSet as CSV
In my previous post, I showed how to convert a java.sql.ResultSet to JSON and stream it back to the caller.…
Read More » -
Java 11: New HTTP Client API
In Java 11, the incubated HTTP Client API first introduced in Java 9, has been standardised. It makes it easier…
Read More »