Possible Duplicate:
#ifdef #ifndef in Java
I'm trying to implement some debug messages in my Android code by using something like this:
private static final boolean DEBUG = false;
if (DEBUG) {
// some code
}
However, upon compilation I keep getting "Illegal start of expression" errors. final boolean works, but neither static nor private work.
I'm declaring the DEBUG variable in methods. Would also appreciate if there's a way to make this global so that everything within the same Java file will see it rather than me having to declare it in every method that needs it.
Thanks!