Java Array Min Value findMin(String[] strs)

Here you can find the source of findMin(String[] strs)

Description

find Min

License

Open Source License

Declaration

public static int findMin(String[] strs) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int findMin(String[] strs) {
        int result = 0;
        int minLen = 1000;
        for (int i = 0; i < strs.length; i++) {
            if (strs[i].length() < minLen) {
                minLen = strs[i].length();
                result = i;/*from w  w w. ja  v  a2s  .  c om*/
            }
        }
        return result;
    }
}

Related

  1. arrayMin(double[] x)
  2. arrayMin(final double[] array)
  3. arrayMin(int[] property)
  4. findMin(float[] array)
  5. findMin(int[] workArray, int idx)
  6. findMin2(int[] workArray, int idx, int min)
  7. findMinAndMax(double[] array)
  8. findMinAndMax(float[] buffer, int pixelStride, int numBands)
  9. findMinDiff(double[] values)