How to Compile and Execute java Programs.
step 1 : Open Command Prompt (make sure you have installed java development kit(JDK))
step 2 : In command prompt navigate to directory or folder where you had save your java program.
step 3 : Now Follow this :
javac yourprogramname.java (this will compile your java code.)
step 4 : if code is successfully compiled without errors. its time to execute the code.
to execute java program follow this :
java yourprogramname (this will execute your program and will generate the desired output)
No comments:
Post a Comment