Please take a look at this sample android code:
private static final boolean aBoolean = false; ... if(aBoolean){
In this case, since the value of aBoolean is false and that it cannot change at run time, will // do something like a logs report when building, or will it still be collected and will evaluate if each time?
I am trying to find behavior like pre processor #DEFINE #IF ... so that when I code, I get my logs when I free, I switch one value and all my debug code is completely ignored.
(I would also like to point out that my question is focused on android, so if there is a difference between Java and Android on this, please let me know)
java optimization android
Jason rogers
source share