In C/C++ we can use #ifndef RELEASE #endif to include debug source such as some extra tests and/or console print and etc
Is there any way to do it in java or any similiar alternative ?
In C/C++ we can use #ifndef RELEASE #endif to include debug source such as some extra tests and/or console print and etc
Is there any way to do it in java or any similiar alternative ?
You can add a static final boolean variable and then use simple if statements.
If the compiler can determine that the expression is false then it will not compile the conditional into your code.