Core Java
-
Peeking Inside Java Streams with Stream.peek
For a Java developer new to JDK 8-introduced pipelines and streams, the peek(Consumer) method provided by the Stream interface can…
Read More » -
Zuul 2 – Sample filter
Zuul 2 has finally been open sourced. I first heard of Zuul 2 during Spring One 2016 talk by Mikey…
Read More » -
Thread Methods destroy() and stop(Throwable) Removed in JDK 11
The message “RFR(s): 8204243: remove Thread.destroy() and Thread.stop(Throwable)” by @DrDeprecator (Stuart Marks) on the core-libs-dev OpenJDK mailing list is a…
Read More » -
[JDK 11] Class Loader Hierarchy Details Coming to jcmd
I’ve been a fan of the diagnostic command-line tool jcmd since hearing about jcmd at JavaOne 2012. I’ve used this…
Read More » -
JDK 9/10/11: Side Effects from += on Java String
The question “Why does `array[i++%n] += i+” “` give different results in Java 8 and Java 10?” was posted earlier…
Read More » -
API Updates in Java SE 11 (18.9)
Java SE 11, which is also named as 18.9 (based on the new naming scheme which uses the year and…
Read More » -
Binary Search in Java without Recursion – Iterative algorithm
This week’s task is to implement binary search in Java, you need to write both iterative and recursive binary search…
Read More » -
Java 10: Collecting a Stream into an Unmodifiable Collection
Java 10 introduces several new methods to facilitate the creation of unmodifiable collections. The List.copyOf, Set.copyOf, and Map.copyOf methods create…
Read More » -
Void methods as behavior black holes
This post could have been titled ‘Void methods considered harmful’, if ‘considered harmful’ essays weren’t considered harmful themselves. Oh welp.…
Read More »