How many times did the message print? That would tell you if there were any elements with a value of 0.
Type: Posts; User: Norm
How many times did the message print? That would tell you if there were any elements with a value of 0.
Add a println to display when an element is set to 0.
There is a problem in the code that the compiler will tell you about if you use the javac program's -Xlint option.
Here is the command line I use to compile with:
D:\Java\jdk1.7.0.7\bin\javac.exe...
Have you done any tests with a smaller number of elements in the array (say 10) and done some debugging by adding lots of println statements to show you the values of the array as the code executes?...