how to install jdk latest version ubuntu code example
Example: install jdk in ubuntu
sudo add-apt-repository ppa:openjdk-r/ppa # only Ubuntu 17.4 and earlier
sudo apt update
sudo apt install openjdk-8-jdk
sudo add-apt-repository ppa:openjdk-r/ppa # only Ubuntu 17.4 and earlier
sudo apt update
sudo apt install openjdk-8-jdk