Saturday, September 27, 2014

Your First Program

1.  Open Command Prompt

2. Go to Your Folder help of

                            cd  your folder path

3. Make Your first Java File

Notepad HelloWord.java


4. In Your Notepad type Following Code



public class HelloWord
{
public static void main(String args[])
{
System.out.println("Hello, Your welcome in India");
                System.out.print("Hii, ");
                System.out.println(" Your welcome in India");
                System.out.println("Hello, "+" Your welcome in India");

}
}

5. After Saving file again open cmd

6. Type Following Command for Compile Program

javac HelloWord.java


7. Type Following Command for run Program

java HelloWord

8. You See Following Output


No comments:

Post a Comment