package ru.apetrov.user;

import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by Andrey on 10.04.2017.
 */
public class Main {

    /**
     * main.
     * @param args args.
     */
    public static void main(String[] args) {

        User user1 = new User("Tom", 2, new GregorianCalendar(1988, 05, 10));
        User user2 = new User("Tom", 2, new GregorianCalendar(1988, 05, 10));

        Map<User, Object> map = new HashMap<>();

        map.put(user1, "first");
        map.put(user2, "second");

        System.out.println(map.toString());
    }
}

@@ -584,20 +584,226 @@
 oString());%0A
+        System.out.printf(%22%25s %25s%22, %22equals = %22, user1.equals(user2));%0A        System.out.printf(%22%25n%25s %25s%22, %22user1 = %22, user1.hashCode());%0A        System.out.printf(%22%25n%25s %25s%22, %22user2 = %22, user2.hashCode());%0A
     %7D%0A%7D%0A

add lesson 5.5.2 - Main