I\'m trying to find the minimum value of numbers in an array but it doesn\'t always work out properly. This is the code I wrote:
for (int i=0; i <
One option is sort your array and get the first element:
import java.util.Arrays; ... int ints[] = {30,5,7,4,10}; Arrays.sort(ints); int min = ints[0]; int max = ints[ints.length - 1];