As you have been told, it is not a good idea to let nulls into your code. You should change that to "zero" or "nought" or similar.
Joined: Sep 07, 2011
Thanks alot guys for the help, it was args 0 that was throwing everything out of balance.
Also I replaced "null" with "Zero".
It sure does suck being off by something so little..
Btw im throwing in a scanner class for user input I think I should be able to do it but if I can't figure it out you'll be the first to know.
Thanks again for the advice!
Joined: Oct 13, 2005
It's not scanner but Scanner. You should find enough information on the java.util.Scanner documentation page to get input from the keyboard. Beware of closing the Scanner, however, because you will close System.in and can only reopen it by starting a new JVM And careful with nextLine(), which has a little pitfall.
r jones wrote: It sure does suck being off by something so little..
That's why you NEVER NEVER NEVER write more than 2-3 lines of code before compiling. I would even have compiled after only entering the first 3-4 elements in my array, and tested it with appropriate values, before entering all 101 elements.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors