The ending code tag should be [/CODE] not [CODE]. It is like html.
Your code looks nice but you did too much.
Just set nbr to v and then iterate over the array, setting nbr to the smaller of nbr and the current element. When you are done, nbr will be the smallest value.
Hold onto your original code for when your class covers the bubble sort (my favorite).
SCJP 1.4, SCWCD in process
Greg T Robertson
Joined: Nov 18, 2003
To figure this one out think about the actual process you would use in your head to determine which one is the lowest. You start by taking the first number and storing it in your memory. You then compare each of the other numbers in the array to the one stored in memory. If it's lower you update your memory with the lower one and continue on until you find another lower one. If you don't find another lower one by the time you are done - you have found the lowest number. Hope that helps.