title: Java: Is there support for macros?
body: <p>I am just curious on how people solve this. I often write the same type of code all the time. For instance:</p>
  
  <pre><code>new Thread() {
     //...
     //...
     //...
     //Change this line
     //...
     //...
  }.start();
  </code></pre>
  
  <p>I keep changing the line where it says "Change this line" and then starting a thread. This change can be one line or a few lines. How would I go about compacting this code?</p>