This is what I have so far
Map<String, String> courses = new HashMap();
courses.put("Teachers","adam");
so how do I add more teachers using the same key
You can use Map<String, ArrayList<String>>. Then add additional information by doing map.get("Teachers").add("Bob")
You can benefit from computeIfAbsent:
Map<String, List<String>> courses = new HashMap<>();
courses.computeIfAbsent("Teachers", k -> new ArrayList<>()).add("adam");
if you can use google guava,Interface Multimap<K,V> is a good way to do this,and all opereation is simple。
To add a dependency on Guava using Maven, use the following:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0.1-jre</version>
<!-- or, for Android: -->
<version>27.0.1-android</version>
</dependency>
Map<String, List<String>> coursesnew HashMap<>(). (Don't use raw types)