Java itself doesn’t support macros . On the other hand, you could pipe the source code through the C preprocessor (CPP for short) just like the C/C++ compile chain does.
Read moreCan we use define in Java?
Java doesn’t have a general purpose define preprocessor directive . private static final int PROTEINS = 100; Such declarations would be inlined by the compilers (if the value is a compile-time constant).18 Ara 2009
Read more