Here you can find the source of findMin(String[] strs)
public static int findMin(String[] strs)
//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; } }