gistfile1.txt package day18.HashMap;import day18.Student;import java.util.HashMap;/** * 描述: * HashMap集合键是Student值是String的案例 * * @outhor 71948 * @create 2017-10-06 22:19 */public class Demo5_JHashMap { public static voi
package day18.HashMap; import day18.Student; import java.util.HashMap; /** * 描述: * HashMap集合键是Student值是String的案例 * * @outhor 71948 * @create 2017-10-06 22:19 */ public class Demo5_JHashMap { public static void main(String[] args) { HashMapstu = new HashMap<>(); stu.put(new Student("张三",21),"陆丰"); stu.put(new Student("李四",21),"海丰"); stu.put(new Student("王五",21),"潮州"); System.out.println(stu); } }