Assume a Person has data fields 1 last-named and first Name. Write an equal s method that returns true if two Person objects have the same first and last names. Write a hashCode method that satisfies the hashCode contract. Make sure that your hashCode method does not return the same value for Henry James and James Henry. Your equal s method should return a value of false for these two people.
Modify method showindex so each output line displays a word followed by a comma and a list of line numbers separated by commas. You can either edit the string corresponding to each Map entry before displaying it or use methods Map . Entry. get Key and Map . Entry. getVa 1 ue to build a different string.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here