Good day. The program should produce a key and several values for this key, but the values are output in the form of a code: [{Person @ 1b6d3586 = [Phone @ 4554617c, Phone @ 74a14482]}] How to display in a standard form?
public class Task2 { public static void main(String[] args) { Map<Person, List<Phone>> personPhone = new HashMap<Person, List<Phone>>(); personPhone.put(new Person("Иван", "Иванов"), Arrays.asList(new Phone(88002000500L), new Phone(88002000500L))); System.out.println(Arrays.asList(personPhone)); } } class Phone { public long numberPhone; public Phone(long numberPhone) { this.numberPhone = numberPhone; } } class Person { public String name; public String lastName; public Person(String name, String lastName) { this.name = name; this.lastName = lastName; } }