Just noticed that the thread was about OpenJDK, for which there is no cask at the moment. The java cask is the Oracle JDK.
https://github.com/AdoptOpenJDK/homebrew-openjdk
Thought they don't (yet) have openjdk11.
There's also some problems with making (at least) the openjdk8 build appear in the usual places, see https://github.com/AdoptOpenJDK/homebrew-openjdk/issues/9 for how to do it manually.
Edit: Apparently I won't! This isn't ideal.