Check out example codes for "how to change java version in linux". It will help you in understanding the concepts better.

Code Example 1

$ sudo update-alternatives --config java

Code Example 2

sudo update-alternatives --config java

Learn ReactJs, React Native from akashmittal.com