How to Compile/Run Java Program Step by step Procedure

How to Compile Java Program:


  1. First You have to check jdk is installed on your System or not (Open cmd promt and type javac)
  2. If Your System Show like above picture then jdk is available o your system 
  3. save java program on desktop with .java
  4. open cmd promt and enter cd desktop as show below in pic 
  5. then enter javac
  6. again for run enter java sample