For some reason, you want to have more than only one JDKs on your machine. So you have made the installations and want to easily switch between them.
On MacOS, once JDKs are installed, they are located in the /Library/Java/JavaVirtualMachines directory.
As you can see in this screenshot, I have the Java 7 and Java 8 versions available on my Mac. But the 1.8 is my default one.