Change Java version or Switch to an alternate Java version with multiple Java versions being installed on the machine
sudo update-alternatives --config java
and system will show the options available ( Java versions installed on machine ) and will then present with the message -
"Press enter to keep the current choice[*], or type selection number: "
Enter the Selection # of the Java version you would like to be set and press Enter.
Confirm that the version has been changed by running
java - version