title: How do I initialize a Set in Java?
body: <p>This is fine...</p>
  
  <pre><code>public class someClass {
     private Set&lt;Element&gt; pre;
  
     public void someMethod() {
        pre.add(new Element());
     }
  }
  </code></pre>
  
  <p>But this isn't...</p>
  
  <pre><code>public class someClass {
  
      public void someMethod() {
         Set&lt;Element&gt; pre;
         pre.add(new Element());
      }
  }
  </code></pre>
  
  <p>What's the correct syntax for the latter case without just turning it into the former?</p>