title: What is the correct way to use lambda expression in .stream() and in Collectors?
body: <pre><code>   Map&lt;String, EmailAddress&gt; mapAliasAddress;
          mapAliasAddress = Files.lines(Paths.get("emails.csv"))
                  .map(s-&gt;s.split(","))
                  .collect(Collectors.groupBy(s-&gt;s[1], new EmailAddress(s-&gt;s[1],s-&gt;[0])));// first is the alias, second is the email address
  </code></pre>
  
  <p>This is EmailAddress an object class which take in two parameters(alias and email_address)</p>
  
  <p><a href="https://i.stack.imgur.com/TyC1q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TyC1q.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/4WWDr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4WWDr.png" alt="enter image description here"></a></p>