I am programming Android applications, and the best way here may or may not be the same as Java in general.
I simply want to be able to set a debug flag that will on
I suggest to use inbuilt android API BuildConfig
BuildConfig
if (BuildConfig.DEBUG) { // do something for a debug build }