So I trying to find the minimum value in the scoreboard array. I tried this
public int minValue(){// Finds the minimum value value in the array scoreboard int x=0; for(int j=0;j<13;j++){ int z=scoreboard[j]; if(scoreboard[j] < z) x=scoreboard[j]; } return x; }
But it always returns zero, any help?