This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello. I am working on the following Java problem. I am making two modifications to the program. The first is to Ignore cases, which I have completed. The second is to Use a command-line argument. Could anyone offer any suggestions on using a command-line argument with this program. Thanks.
[ October 11, 2003: Message edited by: Troy Johnson ] [ October 11, 2003: Message edited by: Troy Johnson ]
Command-Line arguments are easy to use. Take a look at the signature for the main method:
That String array is where you receive your parameters. (As I learned in C, I call it argv, instead of args...) So, the length of this array will tell you how many parameters there are, and each parameter receives its own spot in the array. Note that, unlike in C, the program name is not passed in here. The first parameter really is the first parameter.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.