Friday, October 29, 2010

My 1st Java Program HELLO WORLD

Today I am going to share my knowledge about  Hello World program.
First of all I have to say you have to familiar with command prompt to make your 1st Java program easily :)
Any way search Google to get DOS commands. Here we are using simple commands like cd.. cd\ cls
I am not going to explain everything in Java program which you are going to type. By the way in future I will upload video files all about object oriented programming.

Here is the most easiest way to prevent from errors when you are creating a Java program.

First create folder for you in C: Drive by clicking my computer --- C: .   Name that folder in to your name
1. Open notepad on that folder.
2. Type your program as follow
3. Then save it with the extension .java (dot java) ex:  (Use class name to save your program)
4.Open command prompt by giving CMD command in Windows Run.  (There are many methods to open command prompt)
5.Type Cd\  and press enter
6. Now give your path to program that you have typed.  (My folder name is jayanc)
7. Now you have to compile your java program by giving this command with your file name with extension
    ( I typed it as  javac and pressed enter)

8. If you typed your program without making mistakes then your program will compile like above.
9. OK now we have to type java myfirstjob  and press enter to get the result.

Here it is your  HELLO WORLD program is running perfectly.  :)

Please give your comments.


  1. If one day you feel like crying,
    Call me.
    I don’t promise that I will make you laugh,

    But I can cry with you.

    If one day you want to run away,
    Don’t be afraid to call me.
    I don’t promise to ask you to stop,
    But I can run with you.

    If one day you don’t want to listen to anyone,
    Call me.

    I promise to be there for you.
    And I promise to be very quiet.

    But if one day you call,
    And there is no answer,
    Come fast to see me,
    Perhaps I need you.

  2. Important note: from now on, I'll always visit your blog. Please don't hesitate to visit me. Let's be more than just followers...let's be faithful readers! Thanks :)

    Lovers' Shore

  3. Many thanks dear friend.. Java is the most powerful programing language in the world. I will going to put small Java code to create calculator in near future.So please hang on with this JAVA BLOG.