Ubuntu javac not found

Running javac gives command not found

Command 'javac' not found, but can be installed with:

sudo apt install openjdk-11-jdk-headless  # version 11.0.10+9-0ubuntu1~20.04, or
sudo apt install default-jdk              # version 2:1.11-72
sudo apt install openjdk-13-jdk-headless  # version 13.0.4+8-1~20.04
sudo apt install openjdk-14-jdk-headless  # version 14.0.2+12-1~20.04
sudo apt install openjdk-8-jdk-headless   # version 8u282-b08-0ubuntu1~20.04
sudo apt install ecj                      # version 3.16.0-1

There are multiple option. One way is installing the default-jdk

sudo apt install default-jdk

Afterwards you can checkup if it has run correctly

javac -version
Output: javac 11.0.10