title: Eclipse for Java - run block of code like C++ #ifdef DEBUG
body: <p>I wonder is it possible in Eclipse for Java (or rather in Java itself)  to run a block of code only in debug mode? Just like in C++:</p>
  
  <pre><code>#ifdef DEBUG
    // something to do
  #else
    // something else to do
  #endif
  </code></pre>
  
  <p>I know there is no preprocessor in Java, but maybe there is some workaround?</p>