You weren't that far off with your first attempt. You've actually got the answers before.
I see 3 problems with the initial code and I'll point them out so you can understand what went wrong before:
1. You will always get min = 0. That is, unless you enter a negative number.
You should probably start off with
which is basically what you are doing now in your new code. Or you could do what copeg suggested and do
2. You aren't looping through the entire array, or perhaps even beyond its size, which would generate an exception. Use
for(int i = 0; i < NUMBER_OF_ELEMENTS; i++)
like you did in the first loop, or number.length which is probably better (because it will always be correct even if you for some reason change the size of your array.
3. You could skip the else and just change your if-test:
if(numbers[i] < min) min = numbers[i];
However, in your new code... do you want to use 0 as a special number to tell the program you want to quit?