我有一个字符串: String test = "This is a test string of many words and more"; 此外,我还有一个需要交换的独特单词列表: List<String> words = Arrays.asList("is", "test", "words", "more"); 该列表包含按正确顺序从原始字符串中提取的单词
我的代码执行拆分命令,如下所示:现在,将Description中的单个单词放入数组中,我希望根据每个单词的字符串长度对数组进行排序。例如,如果Description等于"this is a example of a description“,那么我的数组值是this,is,an,example,of,a,description,对吗