To start with java, First we have to install java in our machine and after installing java we have to set path of java in our machine. That path will help us to run java programs in CMD. There are some commands which we use to run program in CMD.
So, to install java JDK(Java Development Kit). We have this link from where you can download Java JDK. If you want to download just click on this link.
Click here to Download
When you will complete this installation you will get two folders on that memory location, which you selected on the time of installation. By default its //C:Program Files/Java