Sunday, November 27, 2022

Become Pro Coder in Java Programming

- Advertisement -

Hello friends, last time I have posted how to install JDK. I hope you guys found it useful. Once you install JDK on your machine and if you are new to java then you might go through a problem that how to start java programming. Here is the solution for beginners.

Professional Coder in Java Programming

  1. Go to the C:/ (or the one where you stored the java folder) directory and go to the java folder which the system has    created at the time of installation.
  1. Go to the jdk1.6… or  1.7… or whichever is your version, then click ‘bin’ folder, then copy the path from the address bar.  
  2. Now on the desktop right click ‘MyComputer’ and select ‘properties’.  
  3. Select ‘Advance system settings’ ->’Environment Variable’ -> from  System variable section select ‘path’ – > ‘Edit’ a small dialog box will open with variable name and variable value .
  4. In the variable value field just put a ‘ ; ‘ at the end and paste the copied path and again add ‘;’  at the end.
  5. Click Ok->Ok->Ok.Here you done with the setting up of the path.

Now we will see how to write the java programme.

  1. Open the Text Editor.(Notepad) or you can use Notepad++
  2. Write a sample java programme as bellow:
public class Hello


       public static void main(String args[])


               System.out.println("Hi..This is my first java programme");



3. Save the above code with the name in the bin folder.

Here you have written the simple code in java.

Professional Coder in Java Programming

Now we will see how to run the above code.

  1. Open up the ‘command prompt’ or simply open the run and type ‘cmd’ and hit ‘ENTER’.
  2. Command prompt will appear on the screen. Type ‘ cd/ ‘ and hit ‘ENTER’.
  3. Type ‘cd path’ where the path= the path of you bin directory. It may be like

“cd Program Files\Java\jdk1.8.0_51\bin”.

4. Now you are in the bin directory. Type javac and hit ‘ENTER’.

5. The program will compile here. Type java Hello and hit ‘ENTER’.

6. You will get the output.i.e. Hi…This is my first java programme.

If you need any help then please feel free to ask us, you can also download our Android app from the play store by searching SyncSaS in it.

Stay in Touch

To follow the best weight loss journeys, success stories and inspirational interviews with the industry's top coaches and specialists. Start changing your life today!

Related Articles

Enable Notifications OK No thanks