import java.util.*;
import java.util.Map.Entry;
public class Main {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        TreeMap<String, Integer> map = new TreeMap<String, Integer>();
        map.put("Anthony", 7);
        map.put("James", 6);
        map.put("Kobe", 24);
        map.put("Durant", 35);
        System.out.println(map.get("Kobe") );
        Set <String> set = map.keySet();
        for (String s : set) {
            System.out.println(s + "=" + map.get(s));
        }
    }
}
0
Posted in Java

Leave a Comment:

电子邮件地址不会被公开。