1.list轉化成數組
List<String> strlist = new ArrayList<String>();
String[] array=(String[]) strlist.toArray(new String[strlist.size()]);
2.set轉化成list
Set BoardSet=new HashSet<Board>();
this.boardList = new ArrayList<Board>(BoardSet);
3.list轉化成set
List list = new ArrayList(new Hashset());
Set set = new HashSet(list);
---------------------------------------------------------------
List list = Arrays.asList(array); //數組轉化成list
list = new LinkedList(Arrays.asList(array));
Set set = new HashSet(Arrays.asList(array));
4.將map轉化成數組
Map parent = new HashMap<String, String>();
Set set = parent.entrySet();