public static String test(){
String str = "hello wordss yes i do go houses";
String[] words = str.split(" ");
List
List
for(String word : words){
list1.add(word);
list2.add(word.length());
}
int maxLength = 0;
String maxStr = "";
for(int i=0;i
maxStr = list1.get(i);
}
}
System.out.println("第一个最长的单词:"+maxStr);
return maxStr;
}