preprocessing command in java

in c program... #define to implement constants what is the equal command in java technology.
[113 byte] By [typeHa] at [2007-11-27 4:05:08]
# 1
There isn't one. Not all languages support all the same features as each other. You can define a constant of-sorts using a static final variable (String, int, whatever)
georgemca at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 2
i am doing a project to find maximum or minimum..i want to define conditional oprators like#define condition <or #define condition >if(a condition b) {}likewise......so can't use final declaration....
typeHa at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 3

> i am doing a project to find maximum or minimum..

> i want to define conditional oprators like

>

> #define condition <

> or

> #define condition >

>

> if(a condition b) {}

> likewise......

>

> so can't use final declaration....

Ah. What types are 'a' and 'b'? Why can't you just use the native < and > operators, or are you planning to overload them? Can't be done in Java

georgemca at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 4
'a' and 'b' are variables...these 'a' and 'b' should be replaced with other variable
typeHa at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 5
> 'a' and 'b' are variables...> these 'a' and 'b' should be replaced with other> variableWell, I know they're variables, but "variable" isn't a data type
georgemca at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 6
>Why can't you just use the native < and > operators, or are you planning to >overload them?thank you for reply..how to use native < and > oprators ? and other one idea?
typeHa at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 7
> >Why can't you just use the native < and > operators,> or are you planning to >overload them?> > thank you for reply..> how to use native < and > oprators ? and other one> idea?Um.....
georgemca at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 8
wat um...?
typeHa at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 9
int a = 203;int b = 67;if ( a < b ) {// do something}
georgemca at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 10
If u are trying to define a macro like C++, i dont think it can be done in Java.you can make the method final so that it cannot be overridden
--stallion--a at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...
# 11

I was going to suggest using a different application to do the preprocessing (including if you like C++ with the correct arguments).

But after reading the thread I have no idea what you are actually after, maybe if you describe what you are attempting to do and why we can suggest the correct approach?

mlka at 2007-7-12 9:10:05 > top of Java-index,Java Essentials,New To Java...