I am writing a program to take 3 command line parameters and perform simple arithmetic. The second parameter is either +, -, *, /, or %. They all work fine except for the asterisk. So if my command line parameters are 6 * 5, when I display all the arguments, it says I have 4 arguments: args: 6 args: Calculator.class args: MathWorker.class args: 5
I am using those two classes... how can i tell my program to just accept an asterisk as an asterisk without it being converted into a list of the classes I'm using? Thanks.
Your shell automatically expands * to be a list of files in the current directory. How you do that depends on what shell you are using. Since you didn't know this I will guess that it is the Windows command prompt. Try typing these two lines at the command line:
Yes, I am using the Windows XP command prompt. So there is not a way to disable the automatic "globbing" (I heard it referred to) that the command prompt promptly commands itself to do? Thanks for the help.
Studying for SCJP 6
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad: