Trace through the code and figure out where the 1 come from. Then figure out how it got there.
Type: Posts; User: jps
Trace through the code and figure out where the 1 come from. Then figure out how it got there.
Do you understand what causes the exception to be thrown? If not search Java.lang.NumberFormatException
If you do, then look at the code to see why the exception was thrown.
No this is not the "we solve your homework forum" this is the "we help you understand what you need to know so you can do your own homework forum".
The double posts will concatenate into one post...
This tutorial shows a loop with an array.
Start at the tutorial I posted previously and work your way through, it is very useful
Add some print statements to see the values of the variables in...
The index for an array starts with 0. See my previous post and visit the tutorial
This tutorial will explain in detail why you get the error, and help explain what the others are saying
[java=highlight] is not a valid code tag. I edited the post and fixed it for you. See the link for proper tags.
Start with "How would you find the answer without a computer?" ... if someone were...
You can find help with the code tags on the Announcements page
"Any suggestions?"
Sure, start by explaining the problem you are having, perhaps what the code is supposed to do vs what it actually...