A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
  • Newsletters

jdk

A collection of 3 posts
Most commonly available JDKs
Java

Most commonly available JDKs

For reasons I dare not mention, I had to install version 7 of the JDK a couple of months ago. As a Mac user, my usual way of installing is using Homebrew. To install a JDK, this is as easy as brew cask install adoptopenjdkx, where x is the Java version. It didn’t work, as AdoptOpenJDK provides no version 7. It took me some time to find a JDK 7. In the end, I found one in Zulu - thanks to Azul.

Nov 22, 2020
Cloneable, a Java design gotcha
Java

Cloneable, a Java design gotcha

Some time ago, I described a couple of surprising design choices in the JDK functional interfaces API. Lately, during a lesson, a student of mine proposed to shallow-copy an ArrayList by using the clone() method: I thought this is another API gotcha worth writing about. Cloning an object means a new object is created with the same state as the original one. As per the JavaDoc: Creates and returns a copy of this object. The precise meaning of 'copy' may depend on the class of the object.

Oct 14, 2018
Diagram of the Doppler effect
Java

Design gotchas in JDK's functional interfaces

Because of a course I prepared, I recently had a closer look at the java.util.function package in JDK 8, and discovered a couple of interesting design choices. A Callable and a Supplier are defined in the same way. But they are not equivalent.

Dec 17, 2017
A Java geek © 2008-2026
v. 9744a65fcb2ff5057d025d26766c50d6f934fc0b/13747693232
Latest Posts