import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ListMap {
/**
* @param args
* <br>
* @exception 例外
* @since 1.0.0
*/
public static void main(String[] args) {
Map maps = new HashMap();
maps.put("5", "a");
maps.put("4", "b");
maps.put("3", "c");
maps.put("2", "d");
maps.put("7", "e");
maps.put("1", "f");
List list = new ArrayList();
System.out.println(maps);
Object[] o = ((HashMap) maps).keySet().toArray();
Arrays.sort(o);
int maxKey = Integer.parseIn
MAP转成LIST(KEY做索引)的实现方法。
最新推荐文章于 2022-02-22 23:53:35 发布