Java: How to use a pair of keys for HashMap
问题 From a sql database, I am reading a table with 2 fields: appName, user. So I may see: +-------------+ | appA | John | +-------------+ | appB | Mary | +-------------+ | appC | Tom | +-------------+ | appA | John | +-------------+ | appA | Mary | +-------------+ Each of these records is stored as an object of a AppClass with appName and user. Now, i want to list how many times the apps were run by different users. So : +-----------------+ | appA | John | 2 | +-----------------+ | appA | Mary |