Java does not use preproccessor directives. As it is, preproccessor directives are more commonly used in C than in C++. Indeed many C++ programmers consider it bad form to use preproccessor directives. The Java developers decided to eliminate them entirely. The elimination of preprocessor directives makes a Java program more readable. You don't have to wind your way through all the #define and typedef statements to see what is actually going on with a Java program. Because there are no preproccessor directives there is also no need for header files. Java uses constants defined in classes to partly take the place of #define statements. |