|Asterisk Input - resolves to ".classpath" [message #665014]
||Tue, 12 April 2011 16:08
| No real name
Registered: April 2011
I'm creating a simple calculator application for a Java course I'm taking. A mathematical expression is fed to the main() method by means of Run > Run Configurations > Arguments tab. On the Arguments tab, I've entered the below (with spaces between each character):|
7 * 5 =
The app is looping over each character in the String [ ] args, and it breaks when it gets to the asterisk. For some reason, the value of the asterisk character string is resolving to ".classpath".
To illustrate, while debugging I output the value of each character within the loop:
And get this result:
Is this expected behavior? Should I be escaping the asterisk or doing something special to it?
Powered by FUDForum
. Page generated in 0.01480 seconds