摘要:
最近代码中需要对两个数组求交,想当然便用到了List中的retainAll函数,但要将将数组转换成list。代码如下:String[] abc = new String[] { "abc", "acd", "add" }; String[] abd = new String[] {"acd", "cd", "de"}; List abcList = Arrays.asList(abc); List abdList = Arrays.asList(abd); abcList.r 阅读全文