Previously I had java 8 installed by default. After upgrading java version to 11 it shows
openjdk 10.0.2 2018-07-17.
jdk-11.0.2_linux-x64_bin.deb from oracle site and installed it. After that I ran
sudo update-alternatives --config java to change the version to 11 but after running
java --version command I get following output:
openjdk 10.0.2 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)