Thursday, December 4, 2014

Your first program on Java

The best training program in the world is absolutely worthless without the will to execute it properly, consistently, and with intensityJohn Romaniello
Yes, that's true. So, let's start our first program. Traditional first program greets world. I am foloowing the same trend.
NOTE: You can use any text editor or fancy IDE like Eclipse or NetBeans but I strongly recommend using simple Notepad cause you are in a very much learning level. I will let you know when it is OK for you to use fancy stuffs.

Open any text editor and cpoy the following
  * @author Palash  
 public class MyFirstProgram {  
       * @param args  
      public static void main(String[] args) {  
           System.out.println("Hello World");  

Save it in file system with name
Now open command prompt and move to the directory where you saved your program.

and type the command javac Wait for a  few seconds while the program compiles and then again type java MyFirstProgram

I wish I was there with you to share the joy...

Next we are going to do some more. Just keep reading...

Prev      Next
Palash Kanti Kundu

No comments:

Post a Comment