Hi I have an error with my code but I do not know what it is, here are my codes:

Code:`public class Q2 {`

public static void main(String[] args) {

int[] numbers={1,2,4,5,10,100,2,-22};

int mostSmall= find(numbers);

System.out.println(mostSmall);

}

public static int find(int[] numbers){

int smallest=0;

for(int i=0;i<numbers.length;i++){

if(numbers[i]<=numbers[i+1]){

smallest= numbers[i];

}

else{

smallest= numbers[i+1];

}

}

return smallest;

}

}