Become Pro Coder in Java Programming

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.
See Also  Do you want to develop Android Apps in Java with 1 example?

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 Hello.java in the bin folder.

Here you have written the simple code in java.

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 Hello.java 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.

0 0 votes
Article Rating

Related articles

Do you want to develop Android Apps in Java with 1 example?

Java is the language of choice as we can...

How to Create a website using Java

How to Create a website using Java Is it possible...

Learn how to create an interface in java

In this article, we will learn how to create...

Case Studies

Compass Music Platform

A clothing brand wanted to launch a new e-commerce website that would allow customers to browse and purchase their products online. We developed a...

NewsWeek Magazine

A clothing brand wanted to launch a new e-commerce website that would allow customers to browse and purchase their products online. We developed a...

Beauty & Makeup Shop

A clothing brand wanted to launch a new e-commerce website that would allow customers to browse and purchase their products online. We developed a...
0
Would love your thoughts, please comment.x
()
x