public class Main{
    public static void main(String[] args){
        int[] a = {2,7,3,4,5,6,7,8};
        int merker = a[0];
        int i =4;
        int n = a.length;
        while(i<n){
            if(a[i] < merker)
                merker = a[i];
            i = i + 1;
        }
        System.out.print(merker);
    }
}
I don't understand why the while loop does not start at the 5th number of the array as i made int i = 4;.
 
     
    