Java中 Map用法

import java.util.*; public class CollectionsDemo { public static void main(String[] args) {

Map m1 = new HashMap(); m1.put("Zara", "8"); m1.put("Mahnaz", "31"); m1.put("Ayan", "12"); m1.put("Daisy", "14"); System.out.println(); System.out.println(" Map Elements"); System.out.print("\t" + m1); } }

猜你喜欢

转载自www.cnblogs.com/jerrys/p/10560446.html