public static int findMin(Integer [] a){ int min = a[0]; for (int i=0; i<=a.length-1;i++){ if(a[i]<min){ min = a[i]; } } return min; }