how to install java on ubuntu 18.0.4 code example Example: how to install java on ubuntu 18.0.4 $ sudo apt install openjdk-11-jdk