Jan 03

A beginner’s appraoch to JAVA

Scribbled on Thursday, January 3rd, 2008

Testing if the compiler path is set right
Compiling the JAVA file named “HelloWorld.java”
Executing(running) the “HelloWorld.class” obtained after compiling in previous step
Congratulations !!!

A Simple Program:

  • Open a new file in notepad or notepad++(recommended)
  • Save it as HelloWorld.java extension
  • Now write these lines in it
  • Download the HelloWorld.java from HERE
public class HelloWorld {
           public static void main (String args[]) {
                    System.out.prinln(”Hello world ! n”);
           }
  }
  • Now save the file and close it (remember the name should be same as the class name and the extension should be .java)
  • Now open command prompt “WIN + R” > cmd
  • Go to the directory where you have saved the file “HelloWorld.java”
  • type “javac HelloWorld.java” (without quotes)
  • If the file compiles successfully without any errors then proceed
  • type “java HelloWorld”
  • The Hello World ! will be displayed on command prompt.

Thats nuff for the time being, will add screenshots and pics to supplement it and add rich content after a while :)


Enjoyed this post? Subscribe to Full Feeds or by Email and receive free daily updates on this Blog.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

  1. 3 Responses to “A beginner’s appraoch to JAVA”

  2. 1

    Yeah me to done with C++.. Now will study Java on my own from 15th (Exam is ending on that day…)
    Java is better then C++ anyway…

    (Nice blog so I am gonna add you to friend’s blog list in my blog….)

    By Quiz_Master on Fri 04th Jan, 2008

  3. 2

    JAVA certainly is an art. The more you learn the more you love it. It’s a community effort :)
    May ur exams go well :)

    By visio159 on Fri 11th Jan, 2008

  1. 1 Trackback(s)

  2. May 15, 2008: A beginner’s appraoch to JAVA « A Bittersweet Life | blog

Post a Comment

January 2008
M T W T F S S
« Dec   Mar »
 123456
78910111213
14151617181920
21222324252627
28293031