Core Java
-
Java 8: A Type Safe Map Builder Using Alternating Interface Exposure
Expose Your Classes Dynamically When I was a Java newbie, I remember thinking that there should be a way of…
Read More » -
Java: Immortal Objects and Object Resurrection
What is Object Resurrection? A Java object is eligible for Garbage Collection when no other object references the object. When…
Read More » -
Watch Out For Recursion in Java 8’s [Primitive]Stream.iterate()
An interesting question by Tagir Valeev on Stack Overflow has recently caught my attention. To keep things short (read the…
Read More » -
Java 8: Declare Private and Protected Methods in Interfaces
When Java 8 was introduced, we could use default methods in interfaces. The main driver for this feature was to…
Read More » -
Put Your Java 8 Method References to Work
Method References As we all know by now, we can use Method References, like String::isEmpty, in Java 8 to reference…
Read More » -
Verifying DateTime and Date with Hamcrest
Since I started diving into automated testing and practicing TDD, verification of date values was pain. Luckily there is nice…
Read More » -
Improve Your JUnit Experience with this Annotation
JUnit is probably part of 90% of all Java projects. And the exciting thing is, we’ll soon have JUnit 5…
Read More » -
Looking at DiagnosticCommandMBean in JConsole and VisualVM
I’ve used JConsole for many years as a suitable generic JMX client. This tool is generally available with the Oracle…
Read More » -
Implementing an annotation interface
Using annotation is every day task for a Java developer. If nothing else simple @Override annotation should ring the bell.…
Read More »