1.list转setSet set = new HashSet(new ArrayList()); 2.set转listList list = new ArrayList(new HashSet()); 3.数组转为listList stooges = Arrays.asList("Larry", "Moe", "Curly");或者String[] arr = {"1", "2"};List list =…
1.list转set Set set = new HashSet( new ArrayList()); 2.set转list List list = new ArrayList( new HashSet()); 3.数组转为list List stooges = Arrays.asList( "Larry" , "Moe" , "Curly" ); 此时stooges中有有三个元素.注意:此时的list不能进行add操作,否则会报…