JDK

A collection of 3 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Nov 22, 2020 JDK

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. Coupled to the fact that I also learned Alibaba provided a JDK and I got curious: how many

Nicolas Fränkel
Oct 14, 2018 API JDK design Cloneable

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.

Nicolas Fränkel
Dec 17, 2017 JDK functional interfaces design

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.

Nicolas Fränkel
A Java geek © 2008-2025
v. cc175def46a5ea4416d57d241d859e495307e500/9964587441
Latest Posts