Hi,
If i have code that says :
public static void main( String args[] )
My user has typed
java Say 900
I know the args.length = 3
So, I know that my number string will be in the hundreds. If if could do a for next loop with
for( int x = 0 ; x < args.length ; x++ )
Split the string 900 into occurences :
x [0] = hundreds
look up hundreds method
x [1] = tens
look up tens method
x [2] = ones
loop up ones method
Based on the occurence of the number, I would like to call the appropriate method. What would be even better, is if I could write a for next loop that looked like this
for( int x = 0 ; x < args.length ; x--)
x [2] = hundreds
look up hundreds method
x [1] = tens
look up tens method
x [0] = ones
loop up ones method
I have been looking at the arrays and thinking of possible ways to resolve the question, without having to write 99 string occurences.
Thanks,
-maritza