給定字符放入list后順序輸出

給定字符放入list后順序輸出

		List<String> list = new ArrayList<String>();
		String s[] = {"g","a","e","c"};
		list.addAll(Arrays.asList(s));
		Set<String> b = new TreeSet<String>(list);
		for (Iterator<String> it = b.iterator(); it.hasNext(); )    
		{    
		System.out.println(it.next());
		} 

 

你可能感兴趣的:(C++,c,C#)