题目:编写一个方法,返回字符串中最小长度的单词的长度. var str = 'What a good day today!'; 1 //方法一 2 function returnString1(str){ 3 var arr = str.split(' '); 4 var num = []; 5 // console.log(arr); 6 for(var i=0,len=arr.length; i<len; i++){ 7 // console.log(arr[i].length); 8 nu
public class Test { public void index() { String strWords = "Hello World My First Unit Test"; String[] words_Array = strWords.split(" "); Map<String,Integer> words_Map=new HashMap<String, Integer>(); int arrLength = words_A