Is using an if (debug) statement recommended?

view story

http://stackoverflow.com – I am planning to add a DEBUG flag, and adding an if statement before every Log.d call public static final boolean DEBUG = FALSE; if (DEBUG) { Log.d(TAG,"Debug"); //dead code } Will the dead code going to be removed in compile time, or will the if statement is going to be called on every time ? (HowTos)