title: is there a way to define flags in java and run code only if those flags are defined?
body: <p>In <code>c\c++</code> can define:  </p>
  
  <pre><code>#ifndef &lt;token&gt;
      /* code */
  #else
      /* code to include if the token is defined */
  #endif
  </code></pre>
  
  <p>my question, is there a way to do it in java? (which is not defining a global static variable..)
  for  example i want to run some code only in debug mode..</p>
  
  <p>thanks!</p>