Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Java Gettingstartedwithjava First Java Program

Related Tutorials


 
 

Share on Google+Share on Google+

First Java Program

Advertisement
In this section you will learn how to develop your first Java program and then compile and test the same on your development machine.

First Java Program

     

In this section you will learn how to develop your first Java program and then compile and test the same on your development machine.

Write first Program in Java

In Java, all source code is written in plain text files with the .java extension. These source files are then compiled into .class files by the javac compiler. This .class file does not contain code that is native to your processor; instead it contains bytecodes that is the machine language for the Java Virtual Machine. 

You can write a Hello World program as your first Java program. Hello world program is the first step of java programming  language. To write the Hello world program you need simple text editor like note pad and  make sure the JDK must be install on your machine for compiling and running that program. 

Learn to write Hello World Java program at http://www.roseindia.net/java/master-java/helloworld.shtml

Compile and Test the Program

Java provides javac compiler to compile the Java program. To compile your HelloWorld program, open the command prompt. Go to the directory where you have saved the file  and issue the following command to compile the program:

C:\javac HelloWorld.java

Learn how to compile and run Java File at http://www.roseindia.net/java/master-java/helloworld.shtml

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 13, 2008

Related Tutorials

Discuss: First Java Program  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com