R
RC
In C/C++ we can do
for example:
#ifdef VERSION_1
// write version 1 codes here
....
#else
// write version 2 codes here
....
#endif
Then when we compile the code with -D option
gcc -DVERSION_1 input_filename.c -o output_filename
This will compile the codes in version 1
gcc input_filename.c -o output_filename
This will compile the codes in version 2
I am just wonder can I use -J option in javac?
If I can, then how do I write the syntax in java codes?
for example:
#ifdef VERSION_1
// write version 1 codes here
....
#else
// write version 2 codes here
....
#endif
Then when we compile the code with -D option
gcc -DVERSION_1 input_filename.c -o output_filename
This will compile the codes in version 1
gcc input_filename.c -o output_filename
This will compile the codes in version 2
I am just wonder can I use -J option in javac?
If I can, then how do I write the syntax in java codes?