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());
    }
}

add lesson 5.5.2 - Main