1. public class Temp {
  2.  
  3.  
  4. public int min(int[] b){
  5. int a=30;
  6. int c=0;
  7. for(int i=0; i<b.length; ++i){
  8. if (b[i]<a){a=b[i];
  9. c=i;
  10. }}
  11. return c;
  12.  
  13. }
  14. public static void main(String[] args) {
  15. ArrayList<Integer> t = new ArrayList<Integer>();
  16.  
  17. int[] a = {20,10, 50, 1, 34, 35, 36, 32, 10, 10, 35, 20, 50, 2000, 5};
  18. System.out.println(min(a));
  19. }
  20.  
  21. }
  22.