I uninstalled all versions of java. I then installed java using
sudo apt install default-jre default-jdk
I then looked to see which java is installed and what version it is. Here is the result I got:
joshua @Joshua-PC ~
$ readlink -f `which java`
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
joshua @Joshua-PC ~
$ java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3, mixed mode)
`
Why is java version 10 in the java 11 directory?