These classnotes are depreciated. As of 2005, I no longer teach the classes. Notes will remain online for legacy purposes

JAVA01/Program With Command Line Switches

Classnotes | JAVA01 | RecentChanges | Preferences

Write a program that takes command line arguments. The first argument should tell the program what to do with the other arguments. The first argument should be one of the following:

  • -cs : Compare strings. The other arguments are strings and should be compared.

  • -len : Show length. Show the length of each of the other arguments

  • -narg : Show how many arguments. Show how many arguments I have been passed.

  • -h : Display a help message that tells each of these command line options (though it doesn't need to explain what they do).


Classnotes | JAVA01 | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited May 29, 2003 1:06 am (diff)
Search:
(C) Copyright 2003 Samuel Hart
Creative Commons License
This work is licensed under a Creative Commons License.