Upgrading to the latest version of Java ensures that Java applications will run with the most up-to-date security and performance improvements on your system.
You can confirm that you have the latest version on the Apple disables the Java plug-in and Webstart applications when the Java update is done using Software Update.
Oracle and only support Java 7 and later, and only on 64 bit systems.
Apple has posted notice that Mac OS X 10.11 (El Capitan) will be the last OS X release that supports Java 6, and as such, recommends developers whose applications depend on Java 6 to migrate their apps to a newer Java version provided by Oracle.
» After I updated to Sierra, Yosemite or El Capitan, why am I told to install Java after I already installed the latest Java? » Why will applets not run after getting Java through Apple Software Update?
» Can I restore Apple Java 6 after uninstalling Oracle Java? » Why is Oracle Java available only for Mac OS X 10.7.3 and above? » The installation hangs during an auto-update, what can I do to get the latest Java?
» More info (apple.com) Mac OS X 10.6 and below: Apple's Java comes pre-installed with your Mac OS.
Update January 23, 2018: Apple has just released mac OS High Sierra 10.13.3, which big fixes and stability improvements. » I do not have Mac version 10.7.3 (Lion) or higher. » Is it safe to install previous or older versions of Java?Yes, see the instructions on the Apple website Restore Apple Java 6.Also, if the Java plug-in detects that no applets have been run for an extended period of time it will again disable the Java plug-in.The Java Runtime depends on the availability of an Application programming interface (API). Apple has no plans to make those API available on older versions of the Mac OS.