How to install multiple Java versions?

The version of Java installed with Android Studio on my Mac is the following (when I run java -version)

openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)

An hour later I’m taking an online class and one of the prerequisites is OpenJDK 11.
How do I install both of the versions side by side on my Mac if I don’t have ASDF.

1 Like