Why do my versions of Java differ?
Accoding to the Java 8 JRE documentation


  Installing a JRE from Oracle will not update java -version symlinks or add java to your path. To be able to do this, you need to install the JDK.


To solve this problem, you have to install the JDK.

One easy way to do it is with Homebrew-Cask :

brew cask install java


If you already installed a previous java version via Homebrew Cask :

brew cask reinstall java