01 December 2009

How to write a java program

Dear friends,        
        

Java technology allows you to work and play in a secure computing environment. 

Java allows you to play online games, chat with people around the world, calculate your mortgage interest, and view images in 3D, just to name a few. 

Now to write a program java first

Class test
        {
        public static void main(String[] args)
            {
             System.out.println("Hello! this is my first java program.");

            }

        }

  1. Save this as test.java
  2. open your command prompt
  3. type javac test.java
  4. A class test.class will be created in corresponding directory
  5. type java test
  6. It will print Hello! this is my first java program

No comments:

Post a Comment