Before we jump into coding let's learn how to install the Java Development Kit (JDK) because you cannot code without an SDK (Software Development Kit), JDK in the case of Java.
Follow these steps:
Downloading the JDK
a) Google "jdk" and follow the first result (oracle.com). Alternatively directly goto http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
b) Look for Java SE Development Kit and download the Windows x86 version (if you have 32 bit Windows) or the Windows x64 version (if you have 64 bit Windows) by accepting the license agreement.
Installing the JDK
a) Open the downloaded file which may be named something like jdk-7u25-windows-i586.exe
b) Follow the simple instructions of the Windows Installer to install JDK (i.e. simply clicking Next on each Window)
c) After the installation is completed go to C:\Program Files\Java\ (or C:\Program Files(x86)\Java\) and check if there is a folder name starting something like jdk1.7.0 (jdk1.7.0_25 in my case)
d) If the above mentioned folder exists you've successfully installed JDK.
P.S. : If you don't know about 32 bit and 64 bit architecture then download the x86 version of JDK.
Follow these steps:
Downloading the JDK
a) Google "jdk" and follow the first result (oracle.com). Alternatively directly goto http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
b) Look for Java SE Development Kit and download the Windows x86 version (if you have 32 bit Windows) or the Windows x64 version (if you have 64 bit Windows) by accepting the license agreement.
Installing the JDK
a) Open the downloaded file which may be named something like jdk-7u25-windows-i586.exe
b) Follow the simple instructions of the Windows Installer to install JDK (i.e. simply clicking Next on each Window)
c) After the installation is completed go to C:\Program Files\Java\ (or C:\Program Files(x86)\Java\) and check if there is a folder name starting something like jdk1.7.0 (jdk1.7.0_25 in my case)
d) If the above mentioned folder exists you've successfully installed JDK.
P.S. : If you don't know about 32 bit and 64 bit architecture then download the x86 version of JDK.