title: #ifdef #ifndef in Java
body: <p>I doubt if there is a way to make compile-time conditions in Java like #ifdef #ifndef in C++.</p>
  
  <p>My problem is that have an algorithm written in Java, and I have different running time improves to that algorithm. So I want to measure how much time I save when each improve is used.</p>
  
  <p>Right now I have a set of boolean variables that are used to decide during the running time which improve should be used and which not. But even testing those variables influences the total running time.  </p>
  
  <p>So I want to find out a way to decide during the compilation time which parts of the program should be compiled and used.  </p>
  
  <p>Does someone knows a way to do it in Java. Or maybe someone knows that there is no such way (it also would be useful).</p>