Tuesday, September 20, 2011

HelloJavaBuddy.java, first java code

Create the first java program, HelloJavaBuddy.java, using plain text editor.

public class HelloJavaBuddy {

public static void main(String[] args) {
System.out.println("Hello, Java-Buddy!");
}

}


Compile the code using the command:
javac HelloJavaBuddy.java

Run it:
java HelloJavaBuddy

HelloJavaBuddy

No comments:

Post a Comment