Lab 1: Warm Up


  1. Environment Configuration

    Follow the Sun trail "Getting Started" to create and run a simple "Hello World!" program. You will need to subscribe to JDK-CURRENT. Nothing needs to be turned in for this part of the lab.

  2. Java API Documentation

    Find the on line API documentation for the standard Java classes, version 5. Find the documentation for the Math class inside the java.lang package. Copy the description of the ceil method verbatim into a text file called API.txt and include this text file in your lab submission.

  3. Parameterized Hello World

    Modify the "Hello World!" program you wrote above to instead print an element (any element) of the args[] array which is passed in as a parameter to the main method. By experimenting with this different command line invocations of your program, surmise the relationship between the contents of args[] and the command line. That is, describe a precise rule for determining the contents of args[].

    Hint: try using a command line invocation like

    java myHello some kind of arg

    Submit your modified program (the java program only, not the .class file). The program should include comments that reflect your answer regarding the contents of args[].