Java中如何取得set?
可以轉換為List:
Set set = new HashSet();
set.add(1);
set.add(2);
set.add(3);
List myList =new ArrayList(set);
System.out.println(myList.get(0));
System.out.println(myList.get(1));
System.out.println(myList.get(2));
Java中如何取得set?
可以轉換為List:
Set set = new HashSet();
set.add(1);
set.add(2);
set.add(3);
List myList =new ArrayList(set);
System.out.println(myList.get(0));
System.out.println(myList.get(1));
System.out.println(myList.get(2));