This article shows you how to find the version of Java installed on a Mac. You can use the "System Preferences" window, the official website of the Java platform or the "Terminal" window.
Steps
Method 1 of 3: Use the System Preferences Window

Step 1. Enter the "Apple" menu by clicking the icon
It features the Apple logo and is located in the upper left corner of the Mac screen. A small drop-down menu will appear.

Step 2. Choose the System Preferences option
It is the second option on the menu starting from the top.

Step 3. Click the Java icon
It is characterized by a blue coffee cup and two orange curved lines. The Java Control Panel will appear in a new dialog box.
If the Java icon is not present, it means that the platform is not installed on the computer

Step 4. Go to the Update Mail tab at the top of the window
This section indicates the Java version number currently installed on the system and whether there is a new, more up-to-date version.
If there is an update, follow the on-screen instructions to install it on your Mac. If you wish, you can select the "Automatically check for updates" checkbox so that Java is automatically updated as soon as a new version is released
Method 2 of 3: Use the Official Website

Step 1. Launch your Mac's Safari internet browser
It features a blue compass icon.

Step 2. Access the Java Official Site using the following URL:
www.java.com/it/download/installed.jsp. Enter the address https://www.java.com/it/download/installed.jsp in the relevant Safari bar and press the Enter key.

Step 3. Press the Verify Java Version button
It is red in color and is positioned in the center of the page. A new pop-up window will appear asking you for permission to run Java within the page.

Step 4. Press the Execute button to confirm your action
The website in question will automatically detect the version of Java currently installed on your Mac and, if necessary, will offer you to update it.
Method 3 of 3: Using the Terminal Window

Step 1. Enter the Spotlight search field by clicking the icon
It features a magnifying glass and is located in the upper right corner of the screen. A small search bar will appear.

Step 2. Type the keyword Terminal into the text field that appears
As you type characters, the results list will change dynamically and will appear below the search bar.

Step 3. Double click on the mouse to select the "Terminal" option characterized by this icon
It is represented by a black square with the white command prompt inside. The Mac "Terminal" window will appear.

Step 4. Type the command java -version and press the Enter key
This will display the version number of Java currently installed on the Mac.