In java you don't have macros (#ifdef) = compiler instructions. In
stead you have to make a plain java function, which will do the same -
the only difference is, the macro will not generate a call instruction
- so it's more efficient.
Personally I use it a lot. It is nice, to be able to switch off
technical or business features by just changing a flag from true to
false. You can use it for having more versions for different
environments, for searching for nasty bugs, or for handling different
versions - alternative to branching.

Hardy Henneberg
http://www.maxikeys.com

On Dec 15, 4:10 am, topazmax <[email protected]> wrote:
> is there a way to enclose conditional code for different builds - for
> example:
>
> in VISUAL C++ i use 'ifdef DEBUG' for code that is only included in
> the debug build and i can be sure that any testing code does not end
> up in the release build - inflating its size.
>
> i searched the java/android docs & blogs without success so where do i
> find information on this sort of thing?
> and how do you pros do it?
>
> any help would be greatly appreciated... thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to