Core Java
-

Arrays.hashCode(Object[]) versus Objects.hash(Object…)
Since JDK 1.5, the Arrays class has offered overloaded static methods with the name “hashCode“. Most of the overloaded methods…
Read More » -

Query Databases Using Java Streams
In this article, you will learn how you can write pure Java applications, that are able to work with data…
Read More » -

JEP 342: The JVM and Spectre
JEP 342 (“Limit Speculative Execution”) has transitioned from “Draft” state to “Candidate” state, but it has not yet been targeted…
Read More » -

JDK 12 Switch Expression Encountering Unanticipated Enum Value
As I wrote about in my post “Playing with JDK 12’s Switch Expressions“, the JDK 12 Early Access Builds have…
Read More » -

JDK 12: Switch Statements/Expressions in Action
My last post “Playing with JDK 12’s Switch Expressions” talked about use of the JDK 12 Early Access Builds to…
Read More » -

Java: Mocking a ResultSet using Mockito
This post shows how you can mock a java.sql.ResultSet using Mockito. It can be used to help unit test code…
Read More » -

Playing with JDK 12’s Switch Expressions
In the blog post “JDK Language Feature Preview in Action: Switch Expressions,” I discussed how JEP 325 [“Switch Expressions (Preview)”]…
Read More » -

JDK Language Feature Preview in Action: Switch Expressions
JEP 12 [“Preview Language and VM Features”] is described on its main page as follows: A preview language or VM…
Read More » -

Nested classes and private methods
When you have a class inside another class they can see each others private methods. It is not well known…
Read More »

