The best and the easiest way to check if Java is being installed on your system is by using the Command Prompt on Windows or Terminal if you're on Mac OS X or any other Linux/Unix flavor.
macOS / Linux / Unix :Open Terminal and type the following command :
$ java -version
If java is being installed on the system you will get a response with the version details,
$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
$

Mac OS X check java installed version using terminal.png
On Windows: XP/7/Vista/8/10
Open Command Prompt and type the following command,
c:\> java -version
If it is installed you should get the ver details as the response of the command,
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)
The other ways to check if Java is installed :
For Windows XP- Click on Start.
- Now Select Control Panel
- Under Control Panel → Add/Remove Programs
- Check in Add/Remove control panel list of softwares installed contains Java with version.

Get Java version.png

Check java installed on Mac OS X.png
- Click on Start
- Now Select Control Panel
- Now Click on Programs and Features
- Check if there is Java version included.
- Goto Control Panel
- Under Control Panel select Programs
- Now Click Programs and Features
- Check if installed Java version is listed.
- Goto System Preferences (you can do a spotlight search to get there)
- Check if you can see Java Icon
- Click on the Java icon
- Click on About button to get the version details
More Posts related to Java,
- [Java] Error: Unmappable character for encoding UTF-8. Save could not be completed.
- IntelliJ: Error: Could not find or load main class, java.lang.ClassNotFoundException
- Your JBoss Application Server 7 is running However you have not yet added any users to be able to access the admin console
- Difference between using Scanner Class and String args for user input in Java
- Maven Unsupported major.minor version 51.0
- Java: TimeZone List with GMT/UTC Offset
- [Fatal Error] XML The markup in the document following the root element must be well-formed.
- Java Split String by Spaces
- [Solved] com.sun.xml.ws.transport.http.servlet.WSServletContextListener ClassNotFoundException
- hibernate.cfg.xml Configuration and Mapping xml Example
More Posts:
- Generate Facebook android SDK keyhash using java code - Android
- Top 10 emerging breakthrough trending technologies - HowTos
- The Android Virtual Device myEmulator is currently running an emulator and cannot be deleted. - Android
- Sharing Multiple Images to Twitter App from your App - Twitter
- Remove Html head and body tags from ckeditor source - Html
- How to remove Floating Action Button Android Studio Blank Activity Template - Android-Studio
- hibernate.cfg.xml Configuration and Mapping xml Example - Java
- [Android Studio] failed to find Build Tools revision 23.0.0 rc1 - Android-Studio
- Android : IOException: Unable to open sync connection! - Android
- How to take a screenshot of android emulator (AVD) screen - Android
- Setup synonyms or alias or thesaurus in SharePoint - SharePoint
- Cannot start Android Studio. No JDK found - Android-Studio
- Android Studio Error: Default Activity not found - Android-Studio
- Change Android Toast Position - Android
- Running Android Lint has encountered a problem NullPointerException Error - Android