Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132937 views
License: OTHER
1
import java.util.HashMap;
2
import java.util.Map;
3
4
public class Main {
5
public static void main(String[] args) {
6
Map<Person, TelephoneNumber> phonebook =
7
new HashMap<Person, TelephoneNumber>();
8
9
TelephoneNumber a = new TelephoneNumber("01636280491");
10
phonebook.put(new Person("Martin", "Thoma"), a);
11
phonebook.put(new Person("Max", "Mustermann"), a);
12
System.out.println(phonebook);
13
}
14
}
15
16