title: Most elegant way to join a Map to a String in Java 8
body: <p>I love <a href="https://github.com/google/guava" rel="noreferrer">Guava</a>, and I'll continue to use Guava a lot. But, where it makes sense, I try to use the "new stuff" in <em>Java 8</em> instead.</p>
  
  <p><strong>"Problem"</strong></p>
  
  <p>Lets say I want to join url attributes in a <code>String</code>. In <em>Guava</em> I would do it like this:</p>
  
  <pre><code>Map&lt;String, String&gt; attributes = new HashMap&lt;&gt;();
  attributes.put("a", "1");
  attributes.put("b", "2");
  attributes.put("c", "3");
  
  // Guava way
  String result = Joiner.on("&amp;").withKeyValueSeparator("=").join(attributes);
  </code></pre>
  
  <p>Where the <code>result</code> is <code>a=1&amp;b=2&amp;c=3</code>.</p>
  
  <p><strong>Question</strong></p>
  
  <p>What is the most elegant way to do this in <em>Java 8</em> (without any 3rd party libraries)?</p>