A colleague of mine recently ran into an issue that I have not run into myself, but found to be interesting and, in my opinion, worth blogging about here. During some distributed Java development, my ...
Do you need to know how to sort Java objects in a collection, array, or map? Here's how to use the Comparable and Comparator interfaces and avoid ClassCastExceptions. Programmers frequently need to ...
The release of Java SE 15 in Sept 2020 will introduce "sealed classes" (JEP 360) as a preview feature. A sealed class is a class or interface which restricts which other classes or interfaces may ...
While the Hashtable was part of the initial Java release over two decades ago, the HashMap is the correct key-value store to use today. One key HashMap vs. Hashtable difference is the fact that the ...