how to get the java version on ubuntu 18.04 code example
Example 1: how to install java on ubuntu 18.0.4
$ sudo apt install openjdk-11-jdk
Example 2: instalar java ubuntu 18.04
sudo apt install default-jre
$ sudo apt install openjdk-11-jdk
sudo apt install default-jre