Previous | Next | Trail Map | Writing Java Programs | The Anatomy of a Java Application


Comparison of DateApp and "Hello World"

This page provides a comparison between the DateApp application and The "Hello World" Application(in the Getting Started trail) If you are not familiar with the "Hello World" application or are not interested in how these two programs differ, just skip this page and go on to the next.

The bold lines in the two program listings below highlight where the programs differ from one another. Specifically,

The DateApp Application

import java.util.Date;
class DateApp {
    public static void main (String args[]) {
        Date today = new Date();
        System.out.println(today);
    }
}

The "Hello World" Application

class HelloWorldApp {
    public static void main (String args[]) {
        System.out.println("Hello World!");
    }
}


Previous | Next | Trail Map | Writing Java Programs | The Anatomy of a Java Application