I have a Linux with two Java versions installed. How may I switch between them?

If you have several Java versions installed on your Linux system, you can switch between them by typing

sudo update-alternatives --config java