title: Java convert a list to a map of sets
body: <p>Say I have a list of objects called Student. Object Student is defined like so</p>
  
  <pre><code>public Class Student {
      private String studentName;
      private String courseTaking;
  }
  </code></pre>
  
  <p>In the list of students, there can be multiple student objects with the same studentName but different courseTaking. Now I want to turn the list of students into a map of studentName and courseTaking like so</p>
  
  <pre><code>Map&lt;String, Set&lt;String&gt;&gt;
  </code></pre>
  
  <p>The key is studentName, and the value is all of the courseTaking of the same student put together as a set. How can I do this using stream() &amp; collect()?</p>