First of all if you don’t have java and you wanna check that you have it or not in your system.
So what you need to do is you need to go to command prompt and there you have to type javac command to compile java programs.
If you entered command and javac is not recognized it means you don’t have java installed in your Windows Operating System.
You need to go to browser and search for java jdk download.
https://www.oracle.com/technetwork/java/javase/downloads/index.html
Click on the above link you will be redirected to download page
Now click on it you will reach to download section. Here you can download any version or for any operating system. Accept licence
Downloaded file and now click on it to install and your installation start just click next and java is downloaded in your system.
C drive->program files->java->here you can see jdk and jre folder. But to use java you have set environment variable for java in windows operating system.
Click on settings you will get this window here you can see Advance Ssytem settings click on it
Search here for path in System Variable
Click on edit
You need to give the path of binary file of java to recognize that java is in your system. For this you just go at the end of varable value and insert secmicolon(;)
Just copy this path and paste it after semicolon and just click ok now java installed in you system.
Now to check java installed once again go to command prompt and type javac.
Now here you can see this run.