May 30, 2008

Chapter: Everything is an Object

Exercise 2: (1) Following the HelloDate.java example in this chapter, create a “hello, world” program that simply displays that statement. You need only a single method in your class (the “main” one that gets executed when the program starts). Remember to make it static and to include the argument list, even though you don’t use the argument list. Compile the program with javac and run it using java. If you are using a different development environment than the JDK, learn how to compile and run programs in that environment.


The classic Hello World program in Java:
public class Exercise2 {
public static void main(String[] args) {
System.out.println("Hello Blog Readers!");
}
}


In Lisp:
(print "Hello Blog Readers!")


In Python:
print "Hello Blog Readers!"

0 comments: