Jan 03
A beginner’s appraoch to JAVA
Scribbled on Thursday, January 3rd, 2008Testing 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

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





3 Responses to “A beginner’s appraoch to JAVA”
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
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