linux command to see all the java version installed

Java
sudo update-alternatives --config java
sudo update-alternatives --display java

Source

Also in Java: