title: Clearest way to declare a HashSet with data in Java
body: <p>What is the most succinct and efficient way to create a Set with data in it in java?
  I have found a couple ways that seem tedious i.e.</p>
  
  <pre><code>Set&lt;String&gt; set = new HashSet&lt;&gt;();
  set.add("a");
  set.add("b");
  set.add("c");
  </code></pre>
  
  <hr>
  
  <pre><code>Set&lt;String&gt; set1 = new HashSet&lt;&gt;(Arrays.asList("a", "b", "c"));
  </code></pre>
  
  <hr>
  
  <pre><code>Set&lt;String&gt; set2 = new HashSet&lt;String&gt;() {{ add("a"); add("b"); add("c"); }};
  </code></pre>
  
  <hr>
  
  <pre><code>Set&lt;String&gt; set3 = Stream.of("a", "b", "c").collect(toSet());
  </code></pre>
  
  <p>Is there a way to simply say <code>HashSet&lt;String&gt; set = new HashSet("a", "b", "c");</code> so that the Set gets created with no extra objects created or extra method calls?</p>