You will be given a String[] customerNames, containing a list of customer names extracted from a database. Your task is to report the customers that occur more than once in this list, and the number of occurrences for each of the repeated customers.
Your method should return the report as a String[]. Each element in this String[] should be of the form
"NAME OCCURS", where NAME is the name of one customer and OCCURS is the number of times his
name occurs in customerNames.
Sort the result in alphabetical order by customer name.
|