Why isn Java pre-compiled like C?
The JIT may seem like an odd concept to you. After all, C compilers compile the C code ahead of time so it is ready to go as soon as you start the program. Why wait for the last minute for Java? Wouldn’t it be simpler and less costly to compile Java ahead of time as well? As in many things, in this case the seemingly intuitively obvious answer is dead wrong. The reason Java is not compiled ahead of time like C (or pascal or most other languages that came before it) is because Java is a very different kind of language. C and the other languages we mentioned are all “early bound languages.” What this means is that in a C program, the code that has to be run as a result of every function call is known at compile time. In C++ this is true for all but “virtual” method calls. Java however is late-bound. Because classes are loaded individually at run-time, and because any call can be over-ridden by a sub-class (except final calls but they only exist for specific security programming reasons a