java – hello world
First Java Program
First to Compile and run a java program you need a Java SE Development Kit . if you don’t have java SE Development Kit download and install from the above link
Below are the steps to compile and run a java Program
Step1.
create a folder JavaProg. I have Created in D:\data\JavaProg
Step2.
Open a text file copy and paste the helloWorld program and save it as “helloWorld.java” in D:\data\JavaProg
public class helloWorld
{
public static void main(String[] args)
{
System.out.println(“Hello World”);
}
}
Step3.
Open a command Promt and type the following commands
Commands are highlighted by a red box and output was highlighted by a green box..
Notify me of follow-up comments via email.
No comments:
Post a Comment